<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><title>hexo主题魔改备忘录 | 云少IT</title><meta name="keywords" content="hexo主题魔改备忘录"><meta name="author" content="云少"><meta name="copyright" content="云少"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="apple-mobile-web-app-title" content="hexo主题魔改备忘录"><meta name="application-name" content="hexo主题魔改备忘录"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="#ffffff"><meta property="og:type" content="article"><meta property="og:title" content="hexo主题魔改备忘录"><meta property="og:url" content="https://it985.github.io/posts/3ec6e747.html"><meta property="og:site_name" content="云少IT"><meta property="og:description" content="hexo主题魔改备忘录   本文记录博主的魔改hexo-anzhiyu主题，以便后期的升级和维护  Hexo 博客文章统计图   本教程来自 eurkon  新建页面在 [Blogroot]\source\ 目录下新建 charts 文件夹，并在新建的 charts 文件夹下新建 index.md"><meta property="og:locale" content="zh-CN"><meta property="og:image" content="https://cn.bing.com/th?id=OHR.VosgesBioReserve_ZH-CN4762694302_UHD.jpg"><meta property="article:author" content="云少"><meta property="article:tag" content="云少IT,IT,技术,分享,程序员,博客,教程,工具,框架,bug,java,spring,数据库,"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://cn.bing.com/th?id=OHR.VosgesBioReserve_ZH-CN4762694302_UHD.jpg"><meta name="description" content="hexo主题魔改备忘录   本文记录博主的魔改hexo-anzhiyu主题，以便后期的升级和维护  Hexo 博客文章统计图   本教程来自 eurkon  新建页面在 [Blogroot]\source\ 目录下新建 charts 文件夹，并在新建的 charts 文件夹下新建 index.md"><link rel="shortcut icon" href="/img/logo.webp"><link rel="canonical" href="https://it985.github.io/posts/3ec6e747"><link rel="preconnect" href="//npm.elemecdn.com"><link rel="preconnect" href="//npm.onmicrosoft.cn"><link rel="preconnect" href="//www.google-analytics.com" crossorigin=""><link rel="preconnect" href="//busuanzi.ibruce.info"><meta name="google-site-verification" content="NuBZ4r-QCqSgo4XUScdEsQW0bolIHEiVGq4A16ndPQA"><meta name="baidu-site-verification" content="code-xxx"><meta name="msvalidate.01" content="xxx"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.cbd.int/@fortawesome/fontawesome-free@6.4.0/css/all.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://cdn.cbd.int/node-snackbar@0.1.16/dist/snackbar.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://cdn.cbd.int/@fancyapps/ui@5.0.20/dist/fancybox/fancybox.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://npm.elemecdn.com/anzhiyu-theme-static@1.0.0/swiper/swiper.min.css" media="print" onload='this.media="all"'><script async src="https://www.googletagmanager.com/gtag/js?id=G-3VMKW5TZBM"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-3VMKW5TZBM")</script><script>const GLOBAL_CONFIG={linkPageTop:{enable:!0,title:"与数百名博主无限进步",addFriendPlaceholder:"昵称（请勿包含博客等字样）：\n网站地址（要求博客地址，请勿提交个人主页）：\n头像图片url（请提供尽可能清晰的图片，我会上传到我自己的图床）：\n描述：\n站点截图（可选）：\n"},peoplecanvas:void 0,postHeadAiDescription:{enable:!0,gptName:"云AI",mode:"tianli",switchBtn:!1,btnLink:"https://afdian.net/item/886a79d4db6711eda42a52540025c377",randomNum:3,basicWordCount:1e3,key:"48580d1e3f53ae174a1e",Referer:"https://blog.tryrun.top"},diytitle:{enable:!0,leaveTitle:"w(ﾟДﾟ)w 不要走！再看看嘛！",backTitle:"♪(^∇^*)欢迎肥来！"},LA51:{enable:!0,ck:"JiFOrFoQklEn9YLS",LingQueMonitorID:"JiqlTmdeI4e1fPbd"},greetingBox:{enable:!0,default:"晚上好👋",list:[{greeting:"晚安😴",startTime:0,endTime:5},{greeting:"早上好鸭👋, 祝你一天好心情！",startTime:6,endTime:9},{greeting:"上午好👋, 状态很好，鼓励一下～",startTime:10,endTime:10},{greeting:"11点多啦, 在坚持一下就吃饭啦～",startTime:11,endTime:11},{greeting:"午安👋, 宝贝",startTime:12,endTime:14},{greeting:"🌈充实的一天辛苦啦！",startTime:14,endTime:18},{greeting:"19点喽, 奖励一顿丰盛的大餐吧🍔。",startTime:19,endTime:19},{greeting:"晚上好👋, 在属于自己的时间好好放松😌~",startTime:20,endTime:24}]},twikooEnvId:"https://twikoo.tryrun.top/",commentBarrageConfig:void 0,root:"/",preloader:{source:2},friends_vue_info:{apiurl:"https://friends.tryrun.top/"},navMusic:!1,mainTone:void 0,authorStatus:{skills:["🤖️ 数码科技爱好者","🔍 分享与热心帮助","🏠 智能家居小能手","🔨 设计开发一条龙","🤝 专修交互与设计","🏃 脚踏实地行动派","🧱 团队小组发动机","💢 壮汉人狠话不多"]},algolia:{appId:"T5VW6VDYLS",apiKey:"227bcb041816af13cb1698db15a8ac89",indexName:"hexo-blog",hits:{per_page:6},languages:{input_placeholder:"输入关键词后按下回车查找",hits_empty:"找不到您查询的内容：${query}",hits_stats:"找到 ${hits} 条结果，用时 ${time} 毫秒"}},localSearch:void 0,translate:{defaultEncoding:2,translateDelay:0,msgToTraditionalChinese:"繁",msgToSimplifiedChinese:"简",rightMenuMsgToTraditionalChinese:"转为繁体",rightMenuMsgToSimplifiedChinese:"转为简体"},noticeOutdate:{limitDay:365,position:"top",messagePrev:"It has been",messageNext:"days since the last update, the content of the article may be outdated."},highlight:{plugin:"highlighjs",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:330},copy:{success:"复制成功",error:"复制错误",noSupport:"浏览器不支持"},relativeDate:{homepage:!0,simplehomepage:!1,post:!0},runtime:"天",date_suffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:void 0,lightbox:"fancybox",Snackbar:{chs_to_cht:"你已切换为繁体",cht_to_chs:"你已切换为简体",day_to_night:"你已切换为深色模式",night_to_day:"你已切换为浅色模式",bgLight:"#425AEF",bgDark:"#1f1f1f",position:"top-center"},source:{justifiedGallery:{js:"https://cdn.cbd.int/flickr-justified-gallery@2.1.2/dist/fjGallery.min.js",css:"https://cdn.cbd.int/flickr-justified-gallery@2.1.2/dist/fjGallery.css"}},isPhotoFigcaption:!1,islazyload:!0,isAnchor:!1,shortcutKey:void 0,autoDarkmode:!0}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={configTitle:"云少IT",title:"hexo主题魔改备忘录",postAI:"true",pageFillDescription:"hexo主题魔改备忘录, Hexo 博客文章统计图, 新建页面, 引入 ECharts.js, 页面引入, 全局引入, 文章统计代码, 使用统计图, 藏宝阁页面的实现, 1.修改page.pug, 2, 方法一：, 方法二：, 3, 方法一：新建collect.styl, 方法二：自定义css文件, 增加辅助函数, 新建collect.yml, 日子中自动弹窗x2F灰屏, 方案一, day.js, lunar.js, SweetAlert.js, 主题配置文件的 inject里面引入, 方案二, 评论表情包放大功能超实用, js, css, twikoo评论区设置气泡, css, 为主页文章卡片添加擦亮动画效果, 文章页展示top_img, 页脚：写了一本书, music默认歌单, 方法一, 方法二, 博客背景切换-弹窗版, 创建按钮, js, css, 引用, 附带, 渐变色, 纯色主题魔改备忘录本文记录博主的魔改主题以便后期的升级和维护博客文章统计图本教程来自新建页面在目录下新建文件夹并在新建的文件夹下新建文件添加以下内容文章统计引入页面引入全局引入以主题为例可以在的配置项中引入文件文章统计代码以主题为例可以在目录下新建文件然后添加以下内容文章发布统计图日期文章篇数文章篇数平均值标签统计图标签文章篇数文章篇数平均值文章分类统计图文章篇数文章篇数使用统计图在上文新建的文件中添加以下内容文章发布时间统计图文章标签统计图文章分类统计图藏宝阁页面的实现本教程来自修改在中添加如下代码方法一本教程来自在下新建文件并粘贴如下代码样式可能需要根据自己的页面进行微调电影未知方法二一些收藏暂无评论那些年看的视频电影未知方法一新建在下新建文件并粘贴如下代码方法二自定义文件藏宝阁去除页面白色底框增加辅助函数在的合适位置粘贴如下代码藏宝阁星星整数部分加实心星星小数部分转成半星不够个补空心星星新建在下面新建弄过友链的应该都很熟悉按照如下格式配置即可很像友链格式电影分类描述让子弹飞名字图片链接星左上角图标电影右上角文字日子中自动弹窗灰屏方案一教程来源小窝函数纪念日勿忘国耻振兴中华今天是年月日九一八事变周年纪念日今天是年月日九一八事变周年纪念日勿忘国耻振兴中华勿忘国耻振兴中华今天是年月日卢沟桥事变周年纪念日今天是年月日卢沟桥事变周年纪念日勿忘国耻振兴中华勿忘国耻振兴中华今天是年月日南京大屠杀周年纪念日为遇难的无辜同胞们缅怀今天是年月日南京大屠杀周年纪念日希望你能停下来缅怀遇难的无辜同胞们勿忘国耻振兴中华勿忘国耻振兴中华今天是月日世界慰安妇纪念日今天是月日世界慰安妇纪念日希望你能停下来了解一下来为历史作证为曾经的无辜妇女发声勿忘国耻振兴中华节假日国庆节祖国岁生日快乐祖国岁生日快乐搞来玩的鬼子投降鬼子投降年了鬼子投降年了元旦节年元旦快乐年元旦快乐妇女节各位女神们妇女节快乐各位女神们妇女节快乐震惊微软让免费了竟然违背的原则发布非常抱歉因为不可控原因博客将于明天停止运营再见好消息日本没了美国垮了背后原因竟是时刻心心念念想着祖国的川普微软垮了愚人节随机谎话劳动节劳动节快乐为助力各行各业发展辛勤工作的人们致敬劳动节快乐为助力各行各业发展辛勤工作的人们致敬劳动节劳动节快乐为助力各行各业发展辛勤工作的人们致敬劳动节快乐为助力各行各业发展辛勤工作的人们致敬青年节为有思想政治觉悟拥护中国共产党追求无产阶级共产主义马克思主义的青年们致敬为有思想政治觉悟拥护中国共产党追求无产阶级共产主义马克思主义的青年们致敬儿童节各位小朋友们儿童节快乐各位小朋友们儿童节快乐建党节中国共产党岁生日快乐中国共产党岁生日快乐传统节日部分清明节清明安康清明安康农历采用汉字计算防止出现闰月导致问题正月初六正月初五正月初四正月初三正月初二正月初一腊月三十腊月廿九春节本来只有大年三十到初六但是有时候除夕是大年二十九所以也加上了年新年快乐年新年快乐正月十五元宵节元宵节快乐元宵节快乐正月十五元宵节元宵节快乐元宵节快乐五月初五端午节端午节快乐端午节快乐七月初七七夕节七夕节快乐七夕节快乐八月十五中秋节中秋节快乐中秋节快乐九月初九重阳节重阳节快乐重阳节快乐区间内的公历农历互转公历转农历农历转公历农历的润大小信息表天干地支之天干速查表甲乙丙丁戊己庚辛壬癸天干地支之地支速查表子丑寅卯辰巳午未申酉戌亥天干地支之地支速查表生肖鼠牛虎兔龙蛇马羊猴鸡狗猪节气速查表小寒大寒立春雨水惊蛰春分清明谷雨立夏小满芒种夏至小暑大暑立秋处暑白露秋分寒露霜降立冬小雪大雪冬至各年的节气日期速查表数字转中文速查表日一二三四五六七八九十日期转农历称呼速查表初十廿卅月份转农历称呼速查表正一二三四五六七八九十冬腊返回农历年一整年的总天数返回农历年闰月是哪个月若年没有闰月则返回闰字编码返回农历年闰月的天数若该年没有闰月则返回返回农历年月非闰月的总天数计算为闰月时的天数请使用方法月份参数从至参数错误返回返回公历年月的天数若参数错误返回月份的闰平规律测算后确认返回或农历年份转换为干支纪年农历年的年份数如果余数为则为最后一个天干如果余数为则为最后一个地支公历月日判断所属星座座传入偏移量返回干支相对甲子的偏移量传入公历年获得该年第个节气的公历日期公历年二十四节气中的第几个节气从小寒算起意即年月日立春传入农历数字月份返回汉语通俗表示法腊月月若参数错误返回加上月字传入农历日期数字返回汉字表示法廿一日年份转生肖仅能大致转换精确划分生肖分界线是立春兔传入阳历年月日获得详细的公历农历信息参数区间年份限定上限转换为数字变为公历传参最下限未传参获得当天修正参数是否今天星期几数字表示周几顺应天朝周一开始的惯例农历年闰哪个月效验闰月闰月计算农历闰月天数计算农历普通月天数解除闰月闰月导致数组下标重叠取反农历月农历日天干地支处理当月的两个节气返回当月节为几日开始返回当月节为几日开始依据节气修正干支月传入的日期的节气与否日柱当月一日与相差天数该日期所属的星座传入阳历年月日获得详细的公历农历信息参数区间传入农历年月日以及传入的月份是否闰月获得详细的公历农历信息如果是农历闰月第四个参数赋值即可参数区间传参要求计算该闰月公历但该年得出的闰月与传参的月份并不同超出了最大极限值参数合法性效验计算农历的时间差处理闰月转换闰月农历需补充该年闰月的前一个月的时差年农历正月一日的公历时间为年月日时分秒该时间也是本农历的最开始起始点主题配置文件的里面引入方案二在主题配置文件的里面引入注意方案二无弹框评论表情包放大功能超实用本教程来自如果当前页有评论就执行函数表情放大设置节流阀设置计时器设置放大倍数创建盒子设置插入盒子构造如果需要在评论内容中启用此功能请解除下面的注释禁用右键手机端长按会出现右键菜单为了体验给禁用掉鼠标移入移入毫秒后显示盒子盒子高更新盒子宽更新盒子与屏幕左边距离更新盒子与屏幕顶部距离右边缘检测防止超出屏幕左边缘检测防止超出屏幕设置盒子样式在盒子中插入图片鼠标移出隐藏盒子监听的元素和配置项动画效果代码由提供评论区设置气泡为主页文章卡片添加擦亮动画效果本教程来自为主页文章卡片添加擦亮动画效果铭心石刻文章页展示页脚写了一本书云少已经写了字还在努力更新中加油加油啦好像写完一本埃克苏佩里的小王子了啊好像写完一本鲁迅的呐喊了啊好像写完一本林海音的城南旧事了啊好像写完一本马克吐温的王子与乞丐了了啊好像写完一本鲁迅的彷徨了啊好像写完一本余华的活着了啊好像写完一本曹禺的雷雨了啊好像写完一本史铁生的宿命的写作了啊好像写完一本伯内特的秘密花园了啊好像写完一本曹禺的日出了啊好像写完一本马克吐温的汤姆索亚历险记了啊好像写完一本沈从文的边城了啊好像写完一本亚米契斯的爱的教育了啊好像写完一本巴金的寒夜了啊好像写完一本东野圭吾的解忧杂货店了啊好像写完一本莫泊桑的一生了啊好像写完一本简奥斯汀的傲慢与偏见了啊好像写完一本钱钟书的围城了啊好像写完一本张炜的古船了啊好像写完一本茅盾的子夜了啊好像写完一本阿来的尘埃落定了啊好像写完一本艾米莉勃朗特的呼啸山庄了啊好像写完一本雨果的巴黎圣母院了啊好像写完一本东野圭吾的白夜行了啊好像写完一本我国著名的四大名著了还在努力更新中加油加油啦默认歌单方法一行方法二这个地方写死博客背景切换弹窗版本教程出自博客背景切换弹窗版创建按钮修改切换背景存数据命名数据取数据命名过期时长单位分钟如传入即加载数据时如果超出分钟返回否则返回数据过期或有错误返回否则返回数据上面两个函数如果你有其他需要存取数据的功能也可以直接使用读取背景切换背景函数此处的是为了每次读取时都重新存储一次导致过期时间不稳定如果为则存储即设置背景为则不存储即每次加载自动读取背景以下为新增内容创建窗口切换背景每一类我放了一个演示直接往下复制粘贴标签就可以需要注意的是函数里面的链接冒号前面需要添加反斜杠进行转义点我恢复默认背景图片手机图片手机图片手机图片手机图片电脑图片电脑图片电脑图片电脑渐变色渐变色渐变色渐变色纯色纯色纯色纯色适应窗口大小更新切换状态窗口已创建则控制窗口显示和隐藏没窗口则创建窗口由于全屏会出所以直接给他隐藏背景新增内容引用添加此行这个代表自定义放在最下面附带渐变色纯色",isPost:!0,isHome:!1,isHighlightShrink:!0,isToc:!0,postUpdate:"2021-05-18 17:43:42",postMainColor:""}</script><noscript><style>#nav{opacity:1}.justified-gallery img{opacity:1}#post-meta time,#recent-posts time{display:inline!important}</style></noscript><script>(e=>{e.saveToLocal={set:(e,t,a)=>{var o;0!==a&&(o=Date.now(),localStorage.setItem(e,JSON.stringify({value:t,expiry:o+864e5*a})))},get:e=>{var t=localStorage.getItem(e);if(t){t=JSON.parse(t);if(!(Date.now()>t.expiry))return t.value;localStorage.removeItem(e)}}},e.getScript=(o,c={})=>new Promise((t,e)=>{const a=document.createElement("script");a.src=o,a.async=!0,a.onerror=e,a.onload=a.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(a.onload=a.onreadystatechange=null,t())},Object.keys(c).forEach(e=>{a.setAttribute(e,c[e])}),document.head.appendChild(a)}),e.getCSS=(o,c=!1)=>new Promise((t,e)=>{const a=document.createElement("link");a.rel="stylesheet",a.href=o,c&&(a.id=c),a.onerror=e,a.onload=a.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(a.onload=a.onreadystatechange=null,t())},document.head.appendChild(a)}),e.activateDarkMode=()=>{document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},e.activateLightMode=()=>{document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};var e=saveToLocal.get("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches,a=window.matchMedia("(prefers-color-scheme: light)").matches,o=window.matchMedia("(prefers-color-scheme: no-preference)").matches,c=!t&&!a&&!o,t=(void 0===e?(a?activateLightMode():t?activateDarkMode():(o||c)&&((a=(new Date).getHours())<=6||18<=a?activateDarkMode:activateLightMode)(),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{void 0===saveToLocal.get("theme")&&(e.matches?activateDarkMode:activateLightMode)()})):("light"===e?activateLightMode:activateDarkMode)(),saveToLocal.get("aside-status"));void 0!==t&&("hide"===t?document.documentElement.classList.add("hide-aside"):document.documentElement.classList.remove("hide-aside"));/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")})(window)</script><link rel="stylesheet" href="/css/1.min.css?1" media="async" onload='this.media="all"'><link rel="stylesheet" href="/css/bg.css?1" media="async" onload='this.media="all"'><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="云少IT" type="application/atom+xml"><link rel="alternate" href="/rss.xml" title="云少IT" type="application/rss+xml"></head><body data-type="anzhiyu"><div id="web_bg"></div><div id="an_music_bg"></div><link rel="stylesheet" href="https://cdn.cbd.int/anzhiyu-theme-static@1.1.10/progress_bar/progress_bar.css"><script async src="https://cdn.cbd.int/pace-js@1.2.4/pace.min.js" data-pace-options="{ &quot;restartOnRequestAfter&quot;:false,&quot;eventLag&quot;:false}"></script><div class="post" id="body-wrap"><header class="post-bg" id="page-header"><nav id="nav"><div id="nav-group"><span id="blog_name"><div class="back-home-button"><i class="anzhiyufont anzhiyu-icon-grip-vertical"></i><div class="back-menu-list-groups"><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.tryrun.top/" title="博客"><img class="back-menu-item-icon" src="/img/favicon.ico" alt="博客"><span class="back-menu-item-text">博客</span></a></div></div><div class="back-menu-list-group"><div class="back-menu-list-title">项目</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.tryrun.top" title="图床"><img class="back-menu-item-icon" src="https://www.tryrun.top/favicon.ico" alt="图床"><span class="back-menu-item-text">图床</span></a></div></div></div></div><a id="site-name" href="/" accesskey="h"><div class="title">云少IT</div><i class="anzhiyufont anzhiyu-icon-house-chimney"></i></a></span><div class="mask-name-container"><div id="name-container"><a id="page-name" href="javascript:anzhiyu.scrollToDest(0, 500)" rel="external nofollow noreferrer">PAGE_NAME</a></div></div><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>望四方</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><i class="anzhiyufont anzhiyu-icon-box-archive faa-tada" style="font-size:.9em"></i><span> 归名档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><i class="anzhiyufont anzhiyu-icon-shapes faa-tada" style="font-size:.9em"></i><span> 归四类</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags faa-tada" style="font-size:.9em"></i><span> 书中签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/charts/"><i class="fa-fw fas fa-chart-bar faa-tada"></i><span> 统计</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>友链</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><i class="anzhiyufont anzhiyu-icon-link faa-tada" style="font-size:.9em"></i><span> 四方好友</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/fcircle/"><i class="anzhiyufont anzhiyu-icon-artstation faa-tada" style="font-size:.9em"></i><span> 朋友圈</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/comments/"><i class="anzhiyufont anzhiyu-icon-envelope faa-tada" style="font-size:.9em"></i><span> 留言板</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>我的</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/bangumis/"><i class="anzhiyufont anzhiyu-icon-bilibili faa-tada" style="font-size:.9em"></i><span> 追番页</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/album/"><i class="anzhiyufont anzhiyu-icon-images faa-tada" style="font-size:.9em"></i><span> 刹那间</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/equipment/"><i class="fas fa-heart faa-tada"></i><span> 我的装备</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/collect/"><i class="fas fa-camcorder faa-tada"></i><span> 观影阁</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>关于</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/about/"><i class="anzhiyufont anzhiyu-icon-paper-plane faa-tada" style="font-size:.9em"></i><span> 关于本人</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/essay/"><i class="anzhiyufont anzhiyu-icon-lightbulb faa-tada" style="font-size:.9em"></i><span> 闲言碎语</span></a></li><li><a class="site-page child faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-shoe-prints1 faa-tada" style="font-size:.9em"></i><span> 随便逛逛</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/disclaimer/"><i class="fas fa-heart faa-tada"></i><span> 免责声明</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/love/"><i class="anzhiyufont anzhiyu-icon-heartbeat faa-tada" style="font-size:.9em"></i><span> 恋爱小屋</span></a></li></ul></div></div></div><div id="nav-right"><div class="nav-button only-home" id="travellings_button" title="随机前往一个开往项目网站"><a class="site-page" onclick="anzhiyu.totraveling()" title="随机前往一个开往项目网站" href="javascript:void(0);" rel="external nofollow" data-pjax-state="external"><i class="anzhiyufont anzhiyu-icon-train"></i></a></div><div class="nav-button" id="randomPost_button"><a class="site-page" onclick="toRandomPost()" title="随机前往一个文章" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-dice"></i></a></div><div class="nav-button" id="search-button"><a class="site-page social-icon search" href="javascript:void(0);" rel="external nofollow noreferrer" title="搜索🔍" accesskey="s"><i class="anzhiyufont anzhiyu-icon-magnifying-glass"></i><span> 搜索</span></a></div><input id="center-console" type="checkbox"><label class="widget" for="center-console" title="中控台" onclick="anzhiyu.switchConsole()"><i class="left"></i><i class="widget center"></i><i class="widget right"></i></label><div id="console"><div class="console-card-group-reward"><ul class="reward-all console-card"><li class="reward-item"><a href="/img/wxpay.webp" target="_blank"><img class="post-qr-code-img" alt="wechat" src="/img/wxpay.webp"></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/alipay.webp" target="_blank"><img class="post-qr-code-img" alt="alipay" src="/img/alipay.webp"></a><div class="post-qr-code-desc">alipay</div></li></ul></div><div class="console-card-group"><div class="console-card-group-left"><div class="console-card" id="card-newest-comments"><div class="card-content"><div class="author-content-item-tips">互动</div><span class="author-content-item-title">最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></div></div><div class="console-card-group-right"><div class="console-card tags"><div class="card-content"><div class="author-content-item-tips">兴趣点</div><span class="author-content-item-title">寻找你感兴趣的领域</span><div class="card-tags"><div class="item-headline"></div><div class="card-tag-cloud"><a href="/tags/API/" style="font-size:1.05rem;color:#637571">API<sup>43</sup></a><a href="/tags/Base64/" style="font-size:1.05rem;color:#8a0460">Base64<sup>1</sup></a><a href="/tags/Collectors/" style="font-size:1.05rem;color:#6b3641">Collectors<sup>3</sup></a><a href="/tags/Date/" style="font-size:1.05rem;color:#5e6603">Date<sup>3</sup></a><a href="/tags/Executor/" style="font-size:1.05rem;color:#abb61f">Executor<sup>9</sup></a><a href="/tags/Guava/" style="font-size:1.05rem;color:#6dc55c">Guava<sup>1</sup></a><a href="/tags/JVM/" style="font-size:1.05rem;color:#8745c2">JVM<sup>8</sup></a><a href="/tags/Java8/" style="font-size:1.05rem;color:#804042">Java8<sup>21</sup></a><a href="/tags/Java9/" style="font-size:1.05rem;color:#21b4c6">Java9<sup>21</sup></a><a href="/tags/Java%E5%B9%B6%E5%8F%91/" style="font-size:1.05rem;color:#0a3988">Java并发<sup>20</sup></a><a href="/tags/Lambda/" style="font-size:1.05rem;color:#29446d">Lambda<sup>4</sup></a><a href="/tags/Lock/" style="font-size:1.05rem;color:#afc378">Lock<sup>1</sup></a><a href="/tags/Maven/" style="font-size:1.05rem;color:#b10843">Maven<sup>1</sup></a><a href="/tags/Memcached/" style="font-size:1.05rem;color:#9663a4">Memcached<sup>23</sup></a><a href="/tags/Mongodb/" style="font-size:1.05rem;color:#b4214d">Mongodb<sup>49</sup></a><a href="/tags/Queue/" style="font-size:1.05rem;color:#220f01">Queue<sup>1</sup></a><a href="/tags/Redis/" style="font-size:1.05rem;color:#c4106c">Redis<sup>27</sup></a><a href="/tags/Stream/" style="font-size:1.05rem;color:#1f5f9f">Stream<sup>4</sup></a><a href="/tags/Thread/" style="font-size:1.05rem;color:#c3563b">Thread<sup>7</sup></a><a href="/tags/Thread-pool/" style="font-size:1.05rem;color:#1a3364">Thread pool<sup>7</sup></a><a href="/tags/forkJoinPool/" style="font-size:1.05rem;color:#1ea132">forkJoinPool<sup>2</sup></a><a href="/tags/stream/" style="font-size:1.05rem;color:#a00679">stream<sup>1</sup></a><a href="/tags/%E4%B8%93%E6%A0%8F/" style="font-size:1.05rem;color:#9e5e9b">专栏<sup>35</sup></a><a href="/tags/%E4%BA%8B%E5%8A%A1/" style="font-size:1.05rem;color:#4d47bc">事务<sup>1</sup></a><a href="/tags/%E4%BC%98%E5%8C%96/" style="font-size:1.05rem;color:#a56245">优化<sup>1</sup></a><a href="/tags/%E5%91%BD%E4%BB%A4/" style="font-size:1.05rem;color:#9c8435">命令<sup>57</sup></a><a href="/tags/%E5%AE%89%E8%A3%85/" style="font-size:1.05rem;color:#647e28">安装<sup>6</sup></a><a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size:1.05rem;color:#a192b9">工具<sup>2</sup></a><a href="/tags/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B/" style="font-size:1.05rem;color:#22a370">数据类型<sup>8</sup></a><a href="/tags/%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F/" style="font-size:1.05rem;color:#6b985c">生命周期<sup>1</sup></a><a href="/tags/%E7%AE%80%E4%BB%8B/" style="font-size:1.05rem;color:#bc5f40">简介<sup>7</sup></a><a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size:1.05rem;color:#167366">算法<sup>10</sup></a><a href="/tags/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" style="font-size:1.05rem;color:#aa928f">设计模式<sup>38</sup></a><a href="/tags/%E9%85%8D%E7%BD%AE/" style="font-size:1.05rem;color:#3a740b">配置<sup>2</sup></a><a href="/tags/%E9%9D%A2%E8%AF%95/" style="font-size:1.05rem;color:#75c343">面试<sup>11</sup></a></div></div><hr></div></div><div class="console-card history"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-box-archiv"></i><span>文章</span></div><div class="card-archives"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多"> <i class="anzhiyufont anzhiyu-icon-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/06/"><span class="card-archive-list-date">六月 2023</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/05/"><span class="card-archive-list-date">五月 2021</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">2</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/10/"><span class="card-archive-list-date">十月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">21</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/09/"><span class="card-archive-list-date">九月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">44</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/08/"><span class="card-archive-list-date">八月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">47</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/07/"><span class="card-archive-list-date">七月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">42</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/06/"><span class="card-archive-list-date">六月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">31</span><span>篇</span></div></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/05/"><span class="card-archive-list-date">五月 2020</span><div class="card-archive-list-count-group"><span class="card-archive-list-count">43</span><span>篇</span></div></a></li></ul></div><hr></div></div></div><div class="button-group"><div class="console-btn-item"><a class="darkmode_switchbutton" title="显示模式切换" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-moon"></i></a></div><div class="console-btn-item" id="consoleHideAside" onclick="anzhiyu.hideAsideBtn()" title="边栏显示控制"><a class="asideSwitch"><i class="anzhiyufont anzhiyu-icon-arrows-left-right"></i></a></div><div class="console-btn-item on" id="consoleCommentBarrage" onclick="anzhiyu.switchCommentBarrage()" title="热评开关"><a class="commentBarrage"><i class="anzhiyufont anzhiyu-icon-message"></i></a></div><div class="console-btn-item" id="consoleMusic" onclick="anzhiyu.musicToggle()" title="音乐开关"><a class="music-switch"><i class="anzhiyufont anzhiyu-icon-music"></i></a></div></div><div class="console-mask" onclick="anzhiyu.hideConsole()" href="javascript:void(0);" rel="external nofollow noreferrer"></div></div><div class="nav-button" id="nav-totop"><a class="totopbtn" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i><span id="percent" onclick="anzhiyu.scrollToDest(0,500)">0</span></a></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer" title="切换"><i class="anzhiyufont anzhiyu-icon-bars"></i></a></div></div></div></nav><div id="post-info"><div id="post-firstinfo"><div class="meta-firstline"><a class="post-meta-original">原创</a><span class="article-meta tags"></span></div></div><h1 class="post-title" itemprop="name headline">hexo主题魔改备忘录</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="anzhiyufont anzhiyu-icon-calendar-days post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" itemprop="dateCreated datePublished" datetime="2021-05-18T09:43:42.000Z" title="发表于 2021-05-18 17:43:42">2021-05-18</time><span class="post-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-history post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" itemprop="dateCreated datePublished" datetime="2021-05-18T09:43:42.000Z" title="更新于 2021-05-18 17:43:42">2021-05-18</time></span></div><div class="meta-secondline"><span class="post-meta-separator"></span><span class="post-meta-wordcount"><i class="anzhiyufont anzhiyu-icon-file-word post-meta-icon" title="文章字数"></i><span class="post-meta-label" title="文章字数">字数总计:</span><span class="word-count" title="文章字数">30.6k</span><span class="post-meta-separator"></span><i class="anzhiyufont anzhiyu-icon-clock post-meta-icon" title="阅读时长"></i><span class="post-meta-label" title="阅读时长">阅读时长:</span><span>179分钟</span></span><span class="post-meta-separator"></span><span class="post-meta-pv-cv" data-flag-title="hexo主题魔改备忘录"><i class="anzhiyufont anzhiyu-icon-fw-eye post-meta-icon"></i><span class="post-meta-label" title="阅读量">阅读量:</span><span id="busuanzi_value_page_pv"><i class="anzhiyufont anzhiyu-icon-spinner anzhiyu-spin"></i></span></span><span class="post-meta-separator"> </span><span class="post-meta-position" title="作者IP属地为武汉"><i class="anzhiyufont anzhiyu-icon-location-dot"></i>武汉</span></div></div></div><section class="main-hero-waves-area waves-area"><svg class="waves-svg" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M -160 44 c 30 0 58 -18 88 -18 s 58 18 88 18 s 58 -18 88 -18 s 58 18 88 18 v 44 h -352 Z"></path></defs><g class="parallax"><use href="#gentle-wave" x="48" y="0"></use><use href="#gentle-wave" x="48" y="3"></use><use href="#gentle-wave" x="48" y="5"></use><use href="#gentle-wave" x="48" y="7"></use></g></svg></section><div id="post-top-cover"><img class="nolazyload" id="post-top-bg" src="https://cn.bing.com/th?id=OHR.MountNemrut_ZH-CN4681788604_UHD.jpg"></div></header><main id="blog-container"><div class="layout" id="content-inner"><div id="post"><div class="post-ai-description"><div class="ai-title"><i class="anzhiyufont anzhiyu-icon-bilibili"></i><div class="ai-title-text">AI-摘要</div><i class="anzhiyufont anzhiyu-icon-arrow-rotate-right"></i><i class="anzhiyufont anzhiyu-icon-circle-dot" title="朗读摘要"></i><div id="ai-tag">Tianli GPT</div></div><div class="ai-explanation">AI初始化中...</div><div class="ai-btn-box"><div class="ai-btn-item">介绍自己 🙈</div><div class="ai-btn-item">生成本文简介 👋</div><div class="ai-btn-item">推荐相关文章 📖</div><div class="ai-btn-item">前往主页 🏠</div><div class="ai-btn-item" id="go-tianli-blog">前往爱发电购买</div></div><script data-pjax src="/js/anzhiyu/ai_abstract.js"></script></div><article class="post-content" id="article-container" itemscope itemtype="https://it985.github.io/posts/3ec6e747.html"><header><h1 id="CrawlerTitle" itemprop="name headline">hexo主题魔改备忘录</h1><span itemprop="author" itemscope itemtype="http://schema.org/Person">云少</span><time itemprop="dateCreated datePublished" datetime="2021-05-18T09:43:42.000Z" title="发表于 2021-05-18 17:43:42">2021-05-18</time><time itemprop="dateCreated datePublished" datetime="2021-05-18T09:43:42.000Z" title="更新于 2021-05-18 17:43:42">2021-05-18</time></header><h1 id="hexo主题魔改备忘录"><a href="#hexo主题魔改备忘录" class="headerlink" title="hexo主题魔改备忘录"></a>hexo主题魔改备忘录</h1><blockquote><p>本文记录博主的魔改<code>hexo-anzhiyu</code>主题，以便后期的升级和维护</p></blockquote><h2 id="Hexo-博客文章统计图"><a href="#Hexo-博客文章统计图" class="headerlink" title="Hexo 博客文章统计图"></a>Hexo 博客文章统计图</h2><blockquote><p>本教程来自 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.eurkon.com/post/1213ef82.html">eurkon</a></p></blockquote><h3 id="新建页面"><a href="#新建页面" class="headerlink" title="新建页面"></a>新建页面</h3><p>在 <code>[Blogroot]\source\</code> 目录下新建 <code>charts</code> 文件夹，并在新建的 <code>charts</code> 文件夹下新建 <code>index.md</code> 文件，添加以下内容：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: 文章统计</span><br><span class="line">date: 2020-03-01 08:00:00</span><br><span class="line">---</span><br></pre></td></tr></table></figure><h3 id="引入-ECharts-js"><a href="#引入-ECharts-js" class="headerlink" title="引入 ECharts.js"></a>引入 ECharts.js</h3><h4 id="页面引入"><a href="#页面引入" class="headerlink" title="页面引入"></a>页面引入</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;script src=&quot;https://npm.elemecdn.com/echarts@4.9.0/dist/echarts.min.js&quot;&gt;&lt;/script&gt;</span><br></pre></td></tr></table></figure><h4 id="全局引入"><a href="#全局引入" class="headerlink" title="全局引入"></a>全局引入</h4><p>以 anzhiyu主题为例，可以在 <code>[Blogroot]\_config.anzhiyu.yml</code> 的 <code>inject</code> 配置项中引入 <code>echart.js</code> 文件</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;https://npm.elemecdn.com/echarts@4.9.0/dist/echarts.min.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure><h3 id="文章统计代码"><a href="#文章统计代码" class="headerlink" title="文章统计代码"></a>文章统计代码</h3><p>以 anzhiyu主题为例，可以在 [Blogroot]\themes\anzhiyu\scripts\helpers\ 目录下新建 charts.js 文件，然后添加以下内容</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> cheerio = <span class="built_in">require</span>(<span class="string">&#x27;cheerio&#x27;</span>)</span><br><span class="line"><span class="keyword">const</span> moment = <span class="built_in">require</span>(<span class="string">&#x27;moment&#x27;</span>)</span><br><span class="line"></span><br><span class="line">hexo.<span class="property">extend</span>.<span class="property">filter</span>.<span class="title function_">register</span>(<span class="string">&#x27;after_render:html&#x27;</span>, <span class="keyword">function</span> (<span class="params">locals</span>) &#123;</span><br><span class="line">  <span class="keyword">const</span> $ = cheerio.<span class="title function_">load</span>(locals)</span><br><span class="line">  <span class="keyword">const</span> post = $(<span class="string">&#x27;#posts-chart&#x27;</span>)</span><br><span class="line">  <span class="keyword">const</span> tag = $(<span class="string">&#x27;#tags-chart&#x27;</span>)</span><br><span class="line">  <span class="keyword">const</span> category = $(<span class="string">&#x27;#categories-chart&#x27;</span>)</span><br><span class="line">  <span class="keyword">const</span> htmlEncode = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (post.<span class="property">length</span> &gt; <span class="number">0</span> || tag.<span class="property">length</span> &gt; <span class="number">0</span> || category.<span class="property">length</span> &gt; <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (post.<span class="property">length</span> &gt; <span class="number">0</span> &amp;&amp; $(<span class="string">&#x27;#postsChart&#x27;</span>).<span class="property">length</span> === <span class="number">0</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (post.<span class="title function_">attr</span>(<span class="string">&#x27;data-encode&#x27;</span>) === <span class="string">&#x27;true&#x27;</span>) htmlEncode = <span class="literal">true</span></span><br><span class="line">      post.<span class="title function_">after</span>(<span class="title function_">postsChart</span>(post.<span class="title function_">attr</span>(<span class="string">&#x27;data-start&#x27;</span>)))</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (tag.<span class="property">length</span> &gt; <span class="number">0</span> &amp;&amp; $(<span class="string">&#x27;#tagsChart&#x27;</span>).<span class="property">length</span> === <span class="number">0</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (tag.<span class="title function_">attr</span>(<span class="string">&#x27;data-encode&#x27;</span>) === <span class="string">&#x27;true&#x27;</span>) htmlEncode = <span class="literal">true</span></span><br><span class="line">      tag.<span class="title function_">after</span>(<span class="title function_">tagsChart</span>(tag.<span class="title function_">attr</span>(<span class="string">&#x27;data-length&#x27;</span>)))</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (category.<span class="property">length</span> &gt; <span class="number">0</span> &amp;&amp; $(<span class="string">&#x27;#categoriesChart&#x27;</span>).<span class="property">length</span> === <span class="number">0</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (category.<span class="title function_">attr</span>(<span class="string">&#x27;data-encode&#x27;</span>) === <span class="string">&#x27;true&#x27;</span>) htmlEncode = <span class="literal">true</span></span><br><span class="line">      category.<span class="title function_">after</span>(<span class="title function_">categoriesChart</span>(category.<span class="title function_">attr</span>(<span class="string">&#x27;data-parent&#x27;</span>)))</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (htmlEncode) &#123;</span><br><span class="line">      <span class="keyword">return</span> $.<span class="title function_">root</span>().<span class="title function_">html</span>().<span class="title function_">replace</span>(<span class="regexp">/&amp;#/g</span>, <span class="string">&#x27;&amp;#&#x27;</span>)</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      <span class="keyword">return</span> $.<span class="title function_">root</span>().<span class="title function_">html</span>()</span><br><span class="line">    &#125;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> locals</span><br><span class="line">  &#125;</span><br><span class="line">&#125;, <span class="number">15</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">postsChart</span> (startMonth) &#123;</span><br><span class="line">  <span class="keyword">const</span> startDate = <span class="title function_">moment</span>(startMonth || <span class="string">&#x27;2020-01&#x27;</span>)</span><br><span class="line">  <span class="keyword">const</span> endDate = <span class="title function_">moment</span>()</span><br><span class="line"></span><br><span class="line">  <span class="keyword">const</span> monthMap = <span class="keyword">new</span> <span class="title class_">Map</span>()</span><br><span class="line">  <span class="keyword">const</span> dayTime = <span class="number">3600</span> * <span class="number">24</span> * <span class="number">1000</span></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">let</span> time = startDate; time &lt;= endDate; time += dayTime) &#123;</span><br><span class="line">    <span class="keyword">const</span> month = <span class="title function_">moment</span>(time).<span class="title function_">format</span>(<span class="string">&#x27;YYYY-MM&#x27;</span>)</span><br><span class="line">    <span class="keyword">if</span> (!monthMap.<span class="title function_">has</span>(month)) &#123;</span><br><span class="line">      monthMap.<span class="title function_">set</span>(month, <span class="number">0</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">  hexo.<span class="property">locals</span>.<span class="title function_">get</span>(<span class="string">&#x27;posts&#x27;</span>).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">post</span>) &#123;</span><br><span class="line">    <span class="keyword">const</span> month = post.<span class="property">date</span>.<span class="title function_">format</span>(<span class="string">&#x27;YYYY-MM&#x27;</span>)</span><br><span class="line">    <span class="keyword">if</span> (monthMap.<span class="title function_">has</span>(month)) &#123;</span><br><span class="line">      monthMap.<span class="title function_">set</span>(month, monthMap.<span class="title function_">get</span>(month) + <span class="number">1</span>)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;)</span><br><span class="line">  <span class="keyword">const</span> monthArr = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>([...monthMap.<span class="title function_">keys</span>()])</span><br><span class="line">  <span class="keyword">const</span> monthValueArr = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>([...monthMap.<span class="title function_">values</span>()])</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="string">`</span></span><br><span class="line"><span class="string">  &lt;script id=&quot;postsChart&quot;&gt;</span></span><br><span class="line"><span class="string">    var color = document.documentElement.getAttribute(&#x27;data-theme&#x27;) === &#x27;light&#x27; ? &#x27;#4c4948&#x27; : &#x27;rgba(255,255,255,0.7)&#x27;</span></span><br><span class="line"><span class="string">    var postsChart = echarts.init(document.getElementById(&#x27;posts-chart&#x27;), &#x27;light&#x27;);</span></span><br><span class="line"><span class="string">    var postsOption = &#123;</span></span><br><span class="line"><span class="string">      title: &#123;</span></span><br><span class="line"><span class="string">        text: &#x27;文章发布统计图&#x27;,</span></span><br><span class="line"><span class="string">        x: &#x27;center&#x27;,</span></span><br><span class="line"><span class="string">        textStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      tooltip: &#123;</span></span><br><span class="line"><span class="string">        trigger: &#x27;axis&#x27;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      xAxis: &#123;</span></span><br><span class="line"><span class="string">        name: &#x27;日期&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;category&#x27;,</span></span><br><span class="line"><span class="string">        boundaryGap: false,</span></span><br><span class="line"><span class="string">        nameTextStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisTick: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLabel: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLine: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          lineStyle: &#123;</span></span><br><span class="line"><span class="string">            color: color</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;monthArr&#125;</span></span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      yAxis: &#123;</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;value&#x27;,</span></span><br><span class="line"><span class="string">        nameTextStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        splitLine: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisTick: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLabel: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLine: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          lineStyle: &#123;</span></span><br><span class="line"><span class="string">            color: color</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      series: [&#123;</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;line&#x27;,</span></span><br><span class="line"><span class="string">        smooth: true,</span></span><br><span class="line"><span class="string">        lineStyle: &#123;</span></span><br><span class="line"><span class="string">            width: 0</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        showSymbol: false,</span></span><br><span class="line"><span class="string">        itemStyle: &#123;</span></span><br><span class="line"><span class="string">          opacity: 1,</span></span><br><span class="line"><span class="string">          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [&#123;</span></span><br><span class="line"><span class="string">            offset: 0,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(128, 255, 165)&#x27;</span></span><br><span class="line"><span class="string">          &#125;,</span></span><br><span class="line"><span class="string">          &#123;</span></span><br><span class="line"><span class="string">            offset: 1,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(1, 191, 236)&#x27;</span></span><br><span class="line"><span class="string">          &#125;])</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        areaStyle: &#123;</span></span><br><span class="line"><span class="string">          opacity: 1,</span></span><br><span class="line"><span class="string">          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [&#123;</span></span><br><span class="line"><span class="string">            offset: 0,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(128, 255, 165)&#x27;</span></span><br><span class="line"><span class="string">          &#125;, &#123;</span></span><br><span class="line"><span class="string">            offset: 1,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(1, 191, 236)&#x27;</span></span><br><span class="line"><span class="string">          &#125;])</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;monthValueArr&#125;</span>,</span></span><br><span class="line"><span class="string">        markLine: &#123;</span></span><br><span class="line"><span class="string">          data: [&#123;</span></span><br><span class="line"><span class="string">            name: &#x27;平均值&#x27;,</span></span><br><span class="line"><span class="string">            type: &#x27;average&#x27;,</span></span><br><span class="line"><span class="string">            label: &#123;</span></span><br><span class="line"><span class="string">              color: color</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">          &#125;]</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;]</span></span><br><span class="line"><span class="string">    &#125;;</span></span><br><span class="line"><span class="string">    postsChart.setOption(postsOption);</span></span><br><span class="line"><span class="string">    window.addEventListener(&#x27;resize&#x27;, () =&gt; &#123; </span></span><br><span class="line"><span class="string">      postsChart.resize();</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">    postsChart.on(&#x27;click&#x27;, &#x27;series&#x27;, (event) =&gt; &#123;</span></span><br><span class="line"><span class="string">      if (event.componentType === &#x27;series&#x27;) window.location.href = &#x27;/archives/&#x27; + event.name.replace(&#x27;-&#x27;, &#x27;/&#x27;);</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">  &lt;/script&gt;`</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">tagsChart</span> (len) &#123;</span><br><span class="line">  <span class="keyword">const</span> tagArr = []</span><br><span class="line">  hexo.<span class="property">locals</span>.<span class="title function_">get</span>(<span class="string">&#x27;tags&#x27;</span>).<span class="title function_">map</span>(<span class="keyword">function</span> (<span class="params">tag</span>) &#123;</span><br><span class="line">    tagArr.<span class="title function_">push</span>(&#123; <span class="attr">name</span>: tag.<span class="property">name</span>, <span class="attr">value</span>: tag.<span class="property">length</span>, <span class="attr">path</span>: tag.<span class="property">path</span> &#125;)</span><br><span class="line">  &#125;)</span><br><span class="line">  tagArr.<span class="title function_">sort</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123; <span class="keyword">return</span> b.<span class="property">value</span> - a.<span class="property">value</span> &#125;)</span><br><span class="line"></span><br><span class="line">  <span class="keyword">const</span> dataLength = <span class="title class_">Math</span>.<span class="title function_">min</span>(tagArr.<span class="property">length</span>, len) || tagArr.<span class="property">length</span></span><br><span class="line">  <span class="keyword">const</span> tagNameArr = []</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; dataLength; i++) &#123;</span><br><span class="line">    tagNameArr.<span class="title function_">push</span>(tagArr[i].<span class="property">name</span>)</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">const</span> tagNameArrJson = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(tagNameArr)</span><br><span class="line">  <span class="keyword">const</span> tagArrJson = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(tagArr)</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="string">`</span></span><br><span class="line"><span class="string">  &lt;script id=&quot;tagsChart&quot;&gt;</span></span><br><span class="line"><span class="string">    var color = document.documentElement.getAttribute(&#x27;data-theme&#x27;) === &#x27;light&#x27; ? &#x27;#4c4948&#x27; : &#x27;rgba(255,255,255,0.7)&#x27;</span></span><br><span class="line"><span class="string">    var tagsChart = echarts.init(document.getElementById(&#x27;tags-chart&#x27;), &#x27;light&#x27;);</span></span><br><span class="line"><span class="string">    var tagsOption = &#123;</span></span><br><span class="line"><span class="string">      title: &#123;</span></span><br><span class="line"><span class="string">        text: &#x27;Top <span class="subst">$&#123;dataLength&#125;</span> 标签统计图&#x27;,</span></span><br><span class="line"><span class="string">        x: &#x27;center&#x27;,</span></span><br><span class="line"><span class="string">        textStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      tooltip: &#123;&#125;,</span></span><br><span class="line"><span class="string">      xAxis: &#123;</span></span><br><span class="line"><span class="string">        name: &#x27;标签&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;category&#x27;,</span></span><br><span class="line"><span class="string">        nameTextStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisTick: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLabel: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          color: color,</span></span><br><span class="line"><span class="string">          interval: 0</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLine: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          lineStyle: &#123;</span></span><br><span class="line"><span class="string">            color: color</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;tagNameArrJson&#125;</span></span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      yAxis: &#123;</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;value&#x27;,</span></span><br><span class="line"><span class="string">        splitLine: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        nameTextStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisTick: &#123;</span></span><br><span class="line"><span class="string">          show: false</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLabel: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        axisLine: &#123;</span></span><br><span class="line"><span class="string">          show: true,</span></span><br><span class="line"><span class="string">          lineStyle: &#123;</span></span><br><span class="line"><span class="string">            color: color</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      series: [&#123;</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;bar&#x27;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;tagArrJson&#125;</span>,</span></span><br><span class="line"><span class="string">        itemStyle: &#123;</span></span><br><span class="line"><span class="string">          borderRadius: [5, 5, 0, 0],</span></span><br><span class="line"><span class="string">          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [&#123;</span></span><br><span class="line"><span class="string">            offset: 0,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(128, 255, 165)&#x27;</span></span><br><span class="line"><span class="string">          &#125;,</span></span><br><span class="line"><span class="string">          &#123;</span></span><br><span class="line"><span class="string">            offset: 1,</span></span><br><span class="line"><span class="string">            color: &#x27;rgba(1, 191, 236)&#x27;</span></span><br><span class="line"><span class="string">          &#125;])</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        emphasis: &#123;</span></span><br><span class="line"><span class="string">          itemStyle: &#123;</span></span><br><span class="line"><span class="string">            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [&#123;</span></span><br><span class="line"><span class="string">              offset: 0,</span></span><br><span class="line"><span class="string">              color: &#x27;rgba(128, 255, 195)&#x27;</span></span><br><span class="line"><span class="string">            &#125;,</span></span><br><span class="line"><span class="string">            &#123;</span></span><br><span class="line"><span class="string">              offset: 1,</span></span><br><span class="line"><span class="string">              color: &#x27;rgba(1, 211, 255)&#x27;</span></span><br><span class="line"><span class="string">            &#125;])</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        markLine: &#123;</span></span><br><span class="line"><span class="string">          data: [&#123;</span></span><br><span class="line"><span class="string">            name: &#x27;平均值&#x27;,</span></span><br><span class="line"><span class="string">            type: &#x27;average&#x27;,</span></span><br><span class="line"><span class="string">            label: &#123;</span></span><br><span class="line"><span class="string">              color: color</span></span><br><span class="line"><span class="string">            &#125;</span></span><br><span class="line"><span class="string">          &#125;]</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;]</span></span><br><span class="line"><span class="string">    &#125;;</span></span><br><span class="line"><span class="string">    tagsChart.setOption(tagsOption);</span></span><br><span class="line"><span class="string">    window.addEventListener(&#x27;resize&#x27;, () =&gt; &#123; </span></span><br><span class="line"><span class="string">      tagsChart.resize();</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">    tagsChart.on(&#x27;click&#x27;, &#x27;series&#x27;, (event) =&gt; &#123;</span></span><br><span class="line"><span class="string">      if(event.data.path) window.location.href = &#x27;/&#x27; + event.data.path;</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">  &lt;/script&gt;`</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">categoriesChart</span> (dataParent) &#123;</span><br><span class="line">  <span class="keyword">const</span> categoryArr = []</span><br><span class="line">  <span class="keyword">let</span> categoryParentFlag = <span class="literal">false</span></span><br><span class="line">  hexo.<span class="property">locals</span>.<span class="title function_">get</span>(<span class="string">&#x27;categories&#x27;</span>).<span class="title function_">map</span>(<span class="keyword">function</span> (<span class="params">category</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (category.<span class="property">parent</span>) categoryParentFlag = <span class="literal">true</span></span><br><span class="line">    categoryArr.<span class="title function_">push</span>(&#123;</span><br><span class="line">      <span class="attr">name</span>: category.<span class="property">name</span>,</span><br><span class="line">      <span class="attr">value</span>: category.<span class="property">length</span>,</span><br><span class="line">      <span class="attr">path</span>: category.<span class="property">path</span>,</span><br><span class="line">      <span class="attr">id</span>: category.<span class="property">_id</span>,</span><br><span class="line">      <span class="attr">parentId</span>: category.<span class="property">parent</span> || <span class="string">&#x27;0&#x27;</span></span><br><span class="line">    &#125;)</span><br><span class="line">  &#125;)</span><br><span class="line">  categoryParentFlag = categoryParentFlag &amp;&amp; dataParent === <span class="string">&#x27;true&#x27;</span></span><br><span class="line">  categoryArr.<span class="title function_">sort</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123; <span class="keyword">return</span> b.<span class="property">value</span> - a.<span class="property">value</span> &#125;)</span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">translateListToTree</span> (data, parent) &#123;</span><br><span class="line">    <span class="keyword">let</span> tree = []</span><br><span class="line">    <span class="keyword">let</span> temp</span><br><span class="line">    data.<span class="title function_">forEach</span>(<span class="function">(<span class="params">item, index</span>) =&gt;</span> &#123;</span><br><span class="line">      <span class="keyword">if</span> (data[index].<span class="property">parentId</span> == parent) &#123;</span><br><span class="line">        <span class="keyword">let</span> obj = data[index];</span><br><span class="line">        temp = <span class="title function_">translateListToTree</span>(data, data[index].<span class="property">id</span>);</span><br><span class="line">        <span class="keyword">if</span> (temp.<span class="property">length</span> &gt; <span class="number">0</span>) &#123;</span><br><span class="line">          obj.<span class="property">children</span> = temp</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (tree.<span class="title function_">indexOf</span>())</span><br><span class="line">          tree.<span class="title function_">push</span>(obj)</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;)</span><br><span class="line">    <span class="keyword">return</span> tree</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">const</span> categoryNameJson = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(categoryArr.<span class="title function_">map</span>(<span class="keyword">function</span> (<span class="params">category</span>) &#123; <span class="keyword">return</span> category.<span class="property">name</span> &#125;))</span><br><span class="line">  <span class="keyword">const</span> categoryArrJson = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(categoryArr)</span><br><span class="line">  <span class="keyword">const</span> categoryArrParentJson = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(<span class="title function_">translateListToTree</span>(categoryArr, <span class="string">&#x27;0&#x27;</span>))</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="string">`</span></span><br><span class="line"><span class="string">  &lt;script id=&quot;categoriesChart&quot;&gt;</span></span><br><span class="line"><span class="string">    var color = document.documentElement.getAttribute(&#x27;data-theme&#x27;) === &#x27;light&#x27; ? &#x27;#4c4948&#x27; : &#x27;rgba(255,255,255,0.7)&#x27;</span></span><br><span class="line"><span class="string">    var categoriesChart = echarts.init(document.getElementById(&#x27;categories-chart&#x27;), &#x27;light&#x27;);</span></span><br><span class="line"><span class="string">    var categoryParentFlag = <span class="subst">$&#123;categoryParentFlag&#125;</span></span></span><br><span class="line"><span class="string">    var categoriesOption = &#123;</span></span><br><span class="line"><span class="string">      title: &#123;</span></span><br><span class="line"><span class="string">        text: &#x27;文章分类统计图&#x27;,</span></span><br><span class="line"><span class="string">        x: &#x27;center&#x27;,</span></span><br><span class="line"><span class="string">        textStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      legend: &#123;</span></span><br><span class="line"><span class="string">        top: &#x27;bottom&#x27;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;categoryNameJson&#125;</span>,</span></span><br><span class="line"><span class="string">        textStyle: &#123;</span></span><br><span class="line"><span class="string">          color: color</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      tooltip: &#123;</span></span><br><span class="line"><span class="string">        trigger: &#x27;item&#x27;</span></span><br><span class="line"><span class="string">      &#125;,</span></span><br><span class="line"><span class="string">      series: []</span></span><br><span class="line"><span class="string">    &#125;;</span></span><br><span class="line"><span class="string">    categoriesOption.series.push(</span></span><br><span class="line"><span class="string">      categoryParentFlag ? </span></span><br><span class="line"><span class="string">      &#123;</span></span><br><span class="line"><span class="string">        nodeClick :false,</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;sunburst&#x27;,</span></span><br><span class="line"><span class="string">        radius: [&#x27;15%&#x27;, &#x27;90%&#x27;],</span></span><br><span class="line"><span class="string">        center: [&#x27;50%&#x27;, &#x27;55%&#x27;],</span></span><br><span class="line"><span class="string">        sort: &#x27;desc&#x27;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;categoryArrParentJson&#125;</span>,</span></span><br><span class="line"><span class="string">        itemStyle: &#123;</span></span><br><span class="line"><span class="string">          borderColor: &#x27;#fff&#x27;,</span></span><br><span class="line"><span class="string">          borderWidth: 2,</span></span><br><span class="line"><span class="string">          emphasis: &#123;</span></span><br><span class="line"><span class="string">            focus: &#x27;ancestor&#x27;,</span></span><br><span class="line"><span class="string">            shadowBlur: 10,</span></span><br><span class="line"><span class="string">            shadowOffsetX: 0,</span></span><br><span class="line"><span class="string">            shadowColor: &#x27;rgba(255, 255, 255, 0.5)&#x27;</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;</span></span><br><span class="line"><span class="string">      :</span></span><br><span class="line"><span class="string">      &#123;</span></span><br><span class="line"><span class="string">        name: &#x27;文章篇数&#x27;,</span></span><br><span class="line"><span class="string">        type: &#x27;pie&#x27;,</span></span><br><span class="line"><span class="string">        radius: [30, 80],</span></span><br><span class="line"><span class="string">        roseType: &#x27;area&#x27;,</span></span><br><span class="line"><span class="string">        label: &#123;</span></span><br><span class="line"><span class="string">          color: color,</span></span><br><span class="line"><span class="string">          formatter: &#x27;&#123;b&#125; : &#123;c&#125; (&#123;d&#125;%)&#x27;</span></span><br><span class="line"><span class="string">        &#125;,</span></span><br><span class="line"><span class="string">        data: <span class="subst">$&#123;categoryArrJson&#125;</span>,</span></span><br><span class="line"><span class="string">        itemStyle: &#123;</span></span><br><span class="line"><span class="string">          emphasis: &#123;</span></span><br><span class="line"><span class="string">            shadowBlur: 10,</span></span><br><span class="line"><span class="string">            shadowOffsetX: 0,</span></span><br><span class="line"><span class="string">            shadowColor: &#x27;rgba(255, 255, 255, 0.5)&#x27;</span></span><br><span class="line"><span class="string">          &#125;</span></span><br><span class="line"><span class="string">        &#125;</span></span><br><span class="line"><span class="string">      &#125;</span></span><br><span class="line"><span class="string">    )</span></span><br><span class="line"><span class="string">    categoriesChart.setOption(categoriesOption);</span></span><br><span class="line"><span class="string">    window.addEventListener(&#x27;resize&#x27;, () =&gt; &#123; </span></span><br><span class="line"><span class="string">      categoriesChart.resize();</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">    categoriesChart.on(&#x27;click&#x27;, &#x27;series&#x27;, (event) =&gt; &#123;</span></span><br><span class="line"><span class="string">      if(event.data.path) window.location.href = &#x27;/&#x27; + event.data.path;</span></span><br><span class="line"><span class="string">    &#125;);</span></span><br><span class="line"><span class="string">  &lt;/script&gt;`</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h3 id="使用统计图"><a href="#使用统计图" class="headerlink" title="使用统计图"></a>使用统计图</h3><p>在上文新建的 <code>[Blogroot]\source\charts\index.md</code> 文件中添加以下内容：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- 文章发布时间统计图 --&gt;</span><br><span class="line">&lt;div id=&quot;posts-chart&quot; data-start=&quot;2021-01&quot; style=&quot;border-radius: 8px; height: 300px; padding: 10px;&quot;&gt;&lt;/div&gt;</span><br><span class="line">&lt;!-- 文章标签统计图 --&gt;</span><br><span class="line">&lt;div id=&quot;tags-chart&quot; data-length=&quot;10&quot; style=&quot;border-radius: 8px; height: 300px; padding: 10px;&quot;&gt;&lt;/div&gt;</span><br><span class="line">&lt;!-- 文章分类统计图 --&gt;</span><br><span class="line">&lt;div id=&quot;categories-chart&quot; data-parent=&quot;true&quot; style=&quot;border-radius: 8px; height: 300px; padding: 10px;&quot;&gt;&lt;/div&gt;</span><br></pre></td></tr></table></figure><h2 id="藏宝阁页面的实现"><a href="#藏宝阁页面的实现" class="headerlink" title="藏宝阁页面的实现"></a>藏宝阁页面的实现</h2><blockquote><p>本教程来自 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.leonus.cn/2023/collectPage.html">Leonus</a></p></blockquote><h3 id="1-修改page-pug"><a href="#1-修改page-pug" class="headerlink" title="1.修改page.pug"></a>1.修改page.pug</h3><p>在<code>[blogRoot]\themes\anzhiyu\layout\page.pug</code>中添加如下代码：</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">when &#x27;tags&#x27;</span><br><span class="line">  include includes/page/tags.pug</span><br><span class="line">when &#x27;link&#x27;</span><br><span class="line">  include includes/page/flink.pug</span><br><span class="line">when &#x27;categories&#x27;</span><br><span class="line">  include includes/page/categories.pug</span><br><span class="line"><span class="addition">+when &#x27;collect&#x27;</span></span><br><span class="line"><span class="addition">+  include includes/page/collect.pug</span></span><br><span class="line">default</span><br><span class="line">  include includes/page/default-page.pug</span><br></pre></td></tr></table></figure><h3 id="2"><a href="#2" class="headerlink" title="2"></a>2</h3><h4 id="方法一："><a href="#方法一：" class="headerlink" title="方法一："></a>方法一：</h4><blockquote><p>本教程来自 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.leonus.cn/2023/collectPage.html">Leonus</a></p></blockquote><p>在<code>[blogRoot]\themes\anzhiyu\layout\includes\page</code>下新建collect.pug文件并粘贴如下代码：<br>（样式可能需要根据自己的页面进行微调）</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">#article-container</span><br><span class="line">  .collect</span><br><span class="line">    - let collectPageContent = page.content</span><br><span class="line">    if site.data.collect</span><br><span class="line">      - let result = &quot;&quot;</span><br><span class="line">      each i in site.data.collect</span><br><span class="line">        - let className = i.class_name ? `&lt;h2 $&#123;i.class_desc?&#x27;&#x27;:&#x27;style=&quot;margin-bottom:12px&quot;&#x27;&#125;&gt;$&#123;i.class_name&#125; ($&#123;i.link_list.length&#125;)&lt;/h2&gt;` : &quot;&quot;</span><br><span class="line">        - let classDesc = i.class_desc ? `&lt;div class=&quot;collect-desc&quot;&gt;$&#123;i.class_desc&#125;&lt;/div&gt;` : &quot;&quot;</span><br><span class="line">        - let listResult = &quot;&quot;</span><br><span class="line">        each j in i.link_list</span><br><span class="line">          - </span><br><span class="line">            listResult += `</span><br><span class="line">              &lt;div title=&quot;$&#123;j.name&#125;&quot; referrerPolicy=&quot;no-referrer&quot; class=&quot;collect_box&quot; style=&quot;$&#123;j.img?`background-image: url($&#123;j.img&#125;)`:&#x27;background-color: #333;&#x27;&#125;&quot;&gt;</span><br><span class="line">                  &lt;div class=&quot;collect_top&quot;&gt;</span><br><span class="line">                    &lt;i class=&quot;$&#123;j.icon?j.icon:&#x27;fa-solid fa-film&#x27;&#125;&quot;&gt;&lt;/i&gt;</span><br><span class="line">                    &lt;span&gt;$&#123;j.tip?j.tip:&#x27;电影&#x27;&#125;&lt;/span&gt;</span><br><span class="line">                  &lt;/div&gt;</span><br><span class="line">                  &lt;div class=&quot;collect_content&quot;&gt;</span><br><span class="line">                    &lt;span&gt;$&#123;j.name?j.name:&#x27;未知&#x27;&#125;&lt;/span&gt;</span><br><span class="line">                    &lt;div&gt;$&#123;j.score?toStar(j.score):toStar(0)&#125;&lt;/div&gt;</span><br><span class="line">                  &lt;/div&gt;</span><br><span class="line">                &lt;/div&gt;</span><br><span class="line">              `</span><br><span class="line">          -</span><br><span class="line">        - result += `$&#123;className&#125;$&#123;classDesc&#125; &lt;div class=&quot;collect-list&quot;&gt;$&#123;listResult&#125;&lt;/div&gt;`</span><br><span class="line">      - collectPageContent = collectPageContent + result</span><br><span class="line">    != collectPageContent</span><br></pre></td></tr></table></figure><h4 id="方法二："><a href="#方法二：" class="headerlink" title="方法二："></a>方法二：</h4><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">blockquote</span></span><br><span class="line">  <span class="selector-tag">b</span> 一些收藏</span><br><span class="line"><span class="selector-class">.hexo-collect-show</span></span><br><span class="line">  - let gamesPageContent = page<span class="selector-class">.content</span></span><br><span class="line">  <span class="keyword">if</span> site<span class="selector-class">.data</span><span class="selector-class">.games</span></span><br><span class="line">    - let result = <span class="string">&quot;&quot;</span></span><br><span class="line">    each <span class="selector-tag">i</span> <span class="keyword">in</span> site<span class="selector-class">.data</span><span class="selector-class">.games</span></span><br><span class="line">      - let className = <span class="selector-tag">i</span><span class="selector-class">.class_name</span> ? `&lt;<span class="selector-tag">h2</span> $&#123;<span class="selector-tag">i</span>.class_desc?<span class="string">&#x27;&#x27;</span>:<span class="string">&#x27;style=&quot;margin-bottom:12px&quot;&#x27;</span>&#125;&gt;$&#123;<span class="selector-tag">i</span>.class_name&#125;&lt;/h2&gt;` : <span class="string">&quot;&quot;</span></span><br><span class="line">      - let classDesc = <span class="selector-tag">i</span><span class="selector-class">.class_desc</span> ? `&lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect-desc&quot;</span>&gt;$&#123;<span class="selector-tag">i</span>.class_desc&#125;&lt;/div&gt;` : <span class="string">&quot;&quot;</span></span><br><span class="line">      - let listResult = <span class="string">&quot;&quot;</span></span><br><span class="line">      each item <span class="keyword">in</span> <span class="selector-tag">i</span><span class="selector-class">.link_list</span></span><br><span class="line">        -</span><br><span class="line">          listResult += `</span><br><span class="line">            &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-item&quot;</span>&gt;</span><br><span class="line">              &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-picture&quot;</span> title=<span class="string">&quot;$&#123;item.name&#125;&quot;</span>&gt;</span><br><span class="line">                &lt;<span class="selector-tag">a</span> target=<span class="string">&quot;_blank&quot;</span> href=<span class="string">&quot;$&#123;item.link&#125;&quot;</span> rel=<span class="string">&quot;external nofollow&quot;</span>&gt;</span><br><span class="line">                  &lt;<span class="selector-tag">img</span> <span class="attribute">src</span>=<span class="string">&quot;$&#123;item.cover&#125;&quot;</span> data-src=<span class="string">&quot;$&#123;item.cover&#125;&quot;</span> referrerpolicy=<span class="string">&quot;no-referrer&quot;</span>&gt;</span><br><span class="line">                &lt;/a&gt;</span><br><span class="line">              &lt;/div&gt;</span><br><span class="line">              &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-info&quot;</span>&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-title&quot;</span> title=<span class="string">&quot;$&#123;item.name&#125;&quot;</span>&gt;</span><br><span class="line">                  &lt;<span class="selector-tag">a</span> target=<span class="string">&quot;_blank&quot;</span> href=<span class="string">&quot;$&#123;item.link&#125;&quot;</span> rel=<span class="string">&quot;external nofollow&quot;</span>&gt;$&#123;item.name&#125;&lt;/a&gt;</span><br><span class="line">                &lt;/div&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;bber-reply&quot;</span> onclick=<span class="string">&quot;rm.rightMenuCommentText(&#x27;$&#123;item.name&#125;&#x27;)&quot;</span>&gt;</span><br><span class="line">                  &lt;<span class="selector-tag">i</span> class=<span class="string">&quot;anzhiyufont anzhiyu-icon-message&quot;</span> style=<span class="string">&quot;cursor:pointer;float:right;right:10px;bottom:1px;position:absolute;&quot;</span>&gt;&lt;/i&gt;</span><br><span class="line">                &lt;/div&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-meta&quot;</span>&gt;$&#123;item.date_grade&#125;&lt;/div&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;hexo-collect-comments&quot;</span>&gt;$&#123;item.comment?item<span class="selector-class">.comment</span>:<span class="string">&#x27;暂无评论&#x27;</span>&#125;&lt;/div&gt;</span><br><span class="line">              &lt;/div&gt;</span><br><span class="line">            &lt;/div&gt;</span><br><span class="line">          `</span><br><span class="line">        -</span><br><span class="line">      - result += `$&#123;className&#125;$&#123;classDesc&#125; &lt;<span class="selector-tag">div</span> id=<span class="string">&quot;hexo-collect-item3&quot;</span>&gt;$&#123;listResult&#125;&lt;/div&gt;`</span><br><span class="line">    - gamesPageContent = gamesPageContent + result</span><br><span class="line">  != gamesPageContent</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">blockquote</span></span><br><span class="line">  <span class="selector-tag">b</span> 那些年看的视频</span><br><span class="line"><span class="selector-class">.collect</span></span><br><span class="line">  - let collectPageContent = page<span class="selector-class">.content</span></span><br><span class="line">  <span class="keyword">if</span> site<span class="selector-class">.data</span><span class="selector-class">.collect</span></span><br><span class="line">    - let result = <span class="string">&quot;&quot;</span></span><br><span class="line">    each <span class="selector-tag">i</span> <span class="keyword">in</span> site<span class="selector-class">.data</span><span class="selector-class">.collect</span></span><br><span class="line">      - let className = <span class="selector-tag">i</span><span class="selector-class">.class_name</span> ? `&lt;<span class="selector-tag">h2</span> $&#123;<span class="selector-tag">i</span>.class_desc?<span class="string">&#x27;&#x27;</span>:<span class="string">&#x27;style=&quot;margin-bottom:12px&quot;&#x27;</span>&#125;&gt;$&#123;<span class="selector-tag">i</span>.class_name&#125;&lt;/h2&gt;` : <span class="string">&quot;&quot;</span></span><br><span class="line">      - let classDesc = <span class="selector-tag">i</span><span class="selector-class">.class_desc</span> ? `&lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect-desc&quot;</span>&gt;$&#123;<span class="selector-tag">i</span>.class_desc&#125;&lt;/div&gt;` : <span class="string">&quot;&quot;</span></span><br><span class="line">      - let listResult = <span class="string">&quot;&quot;</span></span><br><span class="line">      each j <span class="keyword">in</span> <span class="selector-tag">i</span><span class="selector-class">.link_list</span></span><br><span class="line">        -</span><br><span class="line">          listResult += `</span><br><span class="line">            &lt;<span class="selector-tag">div</span> title=<span class="string">&quot;$&#123;j.name&#125;&quot;</span> referrerPolicy=<span class="string">&quot;no-referrer&quot;</span> class=<span class="string">&quot;collect_box&quot;</span> style=<span class="string">&quot;$&#123;j.img?`background-image: url($&#123;j.img&#125;)`:&#x27;background-color: #333;&#x27;&#125;&quot;</span>&gt;</span><br><span class="line">              &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect-div&quot;</span>&gt;&lt;<span class="selector-tag">a</span> target=<span class="string">&quot;_blank&quot;</span> href=<span class="string">&quot;$&#123;j.link&#125;&quot;</span> rel=<span class="string">&quot;external nofollow&quot;</span>&gt;&lt;/a&gt;&lt;/div&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect_top&quot;</span>&gt;</span><br><span class="line">                  &lt;<span class="selector-tag">i</span> class=<span class="string">&quot;$&#123;j.icon?j.icon:&#x27;fa-solid fa-film&#x27;&#125;&quot;</span>&gt;&lt;/i&gt;</span><br><span class="line">                  &lt;span&gt;$&#123;j.tip?j<span class="selector-class">.tip</span>:<span class="string">&#x27;电影&#x27;</span>&#125;&lt;/span&gt;</span><br><span class="line">                &lt;/div&gt;</span><br><span class="line">                &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect_content&quot;</span>&gt;</span><br><span class="line">                  &lt;span&gt;$&#123;j.name?j<span class="selector-class">.name</span>:<span class="string">&#x27;未知&#x27;</span>&#125;&lt;/span&gt;</span><br><span class="line">                  &lt;div&gt;$&#123;j.score?<span class="built_in">toStar</span>(j.score):<span class="built_in">toStar</span>(<span class="number">0</span>)&#125;&lt;/div&gt;</span><br><span class="line">                &lt;/div&gt;</span><br><span class="line">            &lt;/div&gt;</span><br><span class="line">          `</span><br><span class="line">        -</span><br><span class="line">      - result += `$&#123;className&#125;$&#123;classDesc&#125; &lt;<span class="selector-tag">div</span> class=<span class="string">&quot;collect-list&quot;</span>&gt;$&#123;listResult&#125;&lt;/div&gt;`</span><br><span class="line">    - collectPageContent = collectPageContent + result</span><br><span class="line">  != collectPageContent</span><br></pre></td></tr></table></figure><h3 id="3"><a href="#3" class="headerlink" title="3"></a>3</h3><h4 id="方法一：新建collect-styl"><a href="#方法一：新建collect-styl" class="headerlink" title="方法一：新建collect.styl"></a>方法一：新建collect.styl</h4><p>在<code>[blogRoot]\themes\anzhiyu\source\css\_page</code>下新建collect.styl文件并粘贴如下代码：</p><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.collect</span></span><br><span class="line">  <span class="selector-tag">h2</span></span><br><span class="line">    <span class="attribute">margin-bottom</span>: <span class="number">0</span></span><br><span class="line">  <span class="selector-class">.collect-desc</span></span><br><span class="line">    <span class="attribute">margin-bottom</span>: <span class="number">10px</span></span><br><span class="line">  <span class="selector-class">.collect-list</span></span><br><span class="line">    <span class="attribute">display</span>: flex</span><br><span class="line">    <span class="attribute">gap</span>: <span class="number">18px</span></span><br><span class="line">    <span class="attribute">flex-wrap</span>: wrap</span><br><span class="line">    <span class="selector-class">.collect_box</span></span><br><span class="line">      <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">100%</span> / <span class="number">6</span> - <span class="number">15px</span>)</span><br><span class="line">      <span class="attribute">width</span>: <span class="built_in">var</span>(--w)</span><br><span class="line">      <span class="attribute">display</span>: flex</span><br><span class="line">      <span class="attribute">justify-content</span>: space-between</span><br><span class="line">      <span class="attribute">flex-direction</span>: column</span><br><span class="line">      <span class="attribute">background-position</span>: center</span><br><span class="line">      <span class="attribute">background-size</span>: cover</span><br><span class="line">      <span class="attribute">border-radius</span>: <span class="number">12px</span></span><br><span class="line">      <span class="attribute">position</span>: relative</span><br><span class="line">      <span class="attribute">overflow</span>: hidden</span><br><span class="line">      <span class="attribute">padding</span>: <span class="number">10px</span></span><br><span class="line">      <span class="attribute">color</span>: <span class="number">#fff</span></span><br><span class="line">      <span class="attribute">transition</span>: .<span class="number">5s</span></span><br><span class="line">      <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">        <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line">        <span class="attribute">position</span>: absolute</span><br><span class="line">        <span class="attribute">height</span>: <span class="number">100%</span></span><br><span class="line">        <span class="attribute">width</span>: <span class="number">100%</span></span><br><span class="line">        <span class="attribute">left</span>: <span class="number">0</span></span><br><span class="line">        <span class="attribute">top</span>: <span class="number">0</span></span><br><span class="line">        <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.3</span>)</span><br><span class="line">        <span class="attribute">z-index</span>: <span class="number">0</span></span><br><span class="line">        <span class="attribute">transition</span>: .<span class="number">5s</span></span><br><span class="line">      <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">10px</span>)</span><br><span class="line">        <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">          <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.1</span>)</span><br><span class="line">      <span class="selector-class">.collect_top</span></span><br><span class="line">        <span class="attribute">display</span>: flex</span><br><span class="line">        <span class="attribute">z-index</span>: <span class="number">1</span></span><br><span class="line">        <span class="attribute">align-items</span>: center</span><br><span class="line">        <span class="attribute">justify-content</span>: space-between</span><br><span class="line">      <span class="selector-class">.collect_content</span></span><br><span class="line">        <span class="attribute">z-index</span>: <span class="number">1</span></span><br><span class="line">        <span class="attribute">margin-top</span>: <span class="number">86%</span></span><br><span class="line">        <span class="selector-tag">span</span></span><br><span class="line">          <span class="attribute">display</span>: block</span><br><span class="line">          <span class="attribute">font-size</span>: <span class="number">18px</span></span><br><span class="line">          <span class="attribute">font-weight</span>: bold</span><br><span class="line">          <span class="attribute">white-space</span>: nowrap</span><br><span class="line">          <span class="attribute">overflow</span>: hidden</span><br><span class="line">          <span class="attribute">text-overflow</span>: ellipsis</span><br><span class="line"></span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span></span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span></span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#ddd</span> <span class="meta">!important</span></span><br><span class="line">    <span class="selector-pseudo">&amp;:hover</span></span><br><span class="line">      <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">10px</span>)</span><br><span class="line">      <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">        <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.2</span>)</span><br><span class="line">    <span class="selector-pseudo">&amp;::after</span></span><br><span class="line">      <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.5</span>)</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span></span><br><span class="line">  <span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">1100px</span>)</span><br><span class="line">    gap: <span class="number">15px</span></span><br><span class="line">    .collect_box</span><br><span class="line">      --w: calc(<span class="number">20%</span> - <span class="number">12px</span>)</span><br><span class="line">  @media screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">900px</span>)</span><br><span class="line">    gap: <span class="number">16px</span></span><br><span class="line">    .collect_box</span><br><span class="line">      --w: calc(<span class="number">25%</span> - <span class="number">12px</span>)</span><br><span class="line">  @media screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>)</span><br><span class="line">    gap: <span class="number">15px</span></span><br><span class="line">    .collect_box</span><br><span class="line">      --w: calc(<span class="number">100%</span> / <span class="number">3</span> - <span class="number">10px</span>)</span><br><span class="line">  @media screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">500px</span>)</span><br><span class="line">    gap: <span class="number">16px</span></span><br><span class="line">    .collect_box</span><br><span class="line">      --w: calc(<span class="number">50%</span> - <span class="number">8px</span>)</span><br></pre></td></tr></table></figure><h4 id="方法二：自定义css文件"><a href="#方法二：自定义css文件" class="headerlink" title="方法二：自定义css文件"></a>方法二：自定义css文件</h4><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 藏宝阁 */</span></span><br><span class="line"><span class="selector-class">.collect-item-content</span> &#123;</span><br><span class="line">    <span class="attribute">display</span>: flex;</span><br><span class="line">    <span class="attribute">flex-direction</span>: row;</span><br><span class="line">    <span class="attribute">flex-wrap</span>: wrap;</span><br><span class="line">    <span class="attribute">margin</span>: <span class="number">0</span> -<span class="number">8px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item</span> &#123;</span><br><span class="line">    <span class="attribute">width</span>: <span class="built_in">calc</span>(<span class="number">25%</span> - <span class="number">12px</span>);</span><br><span class="line">    <span class="attribute">border-radius</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#e3e8f7</span>;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">    <span class="attribute">margin</span>: <span class="number">8px</span> <span class="number">6px</span>;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">#fff</span>;</span><br><span class="line">    <span class="attribute">box-shadow</span>: <span class="number">0</span> <span class="number">8px</span> <span class="number">16px</span> -<span class="number">4px</span> <span class="number">#2c2d300c</span>;</span><br><span class="line">    <span class="attribute">min-height</span>: <span class="number">400px</span>;</span><br><span class="line">    <span class="attribute">position</span>: relative;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">1200px</span>) &#123;</span><br><span class="line">    <span class="selector-class">.collect-item-content-item</span> &#123;</span><br><span class="line">        <span class="attribute">width</span>: <span class="built_in">calc</span>(<span class="number">50%</span> - <span class="number">12px</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>) &#123;</span><br><span class="line">    <span class="selector-class">.collect-item-content-item</span> &#123;</span><br><span class="line">        <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-info</span> &#123;</span><br><span class="line">    <span class="attribute">padding</span>: <span class="number">8px</span> <span class="number">16px</span> <span class="number">16px</span> <span class="number">16px</span>;</span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">12px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-name</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">18px</span>;</span><br><span class="line">    <span class="attribute">font-weight</span>: bold;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1</span>;</span><br><span class="line">    <span class="attribute">margin-bottom</span>: <span class="number">8px</span>;</span><br><span class="line">    <span class="attribute">white-space</span>: nowrap;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">    <span class="attribute">text-overflow</span>: ellipsis;</span><br><span class="line">    <span class="attribute">width</span>: fit-content;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-specification</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#3c3c43cc</span>;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1</span>;</span><br><span class="line">    <span class="attribute">margin-bottom</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">white-space</span>: nowrap;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">    <span class="attribute">text-overflow</span>: ellipsis;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-description</span> &#123;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">20px</span>;</span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#3c3c43cc</span>;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">60px</span>;</span><br><span class="line">    <span class="attribute">display</span>: -webkit-box;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">    -webkit-line-clamp: <span class="number">3</span>;</span><br><span class="line">    -webkit-box-orient: vertical;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">14px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">a</span><span class="selector-class">.collect-item-content-item-link</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">#9999992b</span>;</span><br><span class="line">    <span class="attribute">padding</span>: <span class="number">4px</span> <span class="number">8px</span>;</span><br><span class="line">    <span class="attribute">border-radius</span>: <span class="number">8px</span>;</span><br><span class="line">    <span class="attribute">cursor</span>: pointer;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">a</span><span class="selector-class">.collect-item-content-item-link</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">#425aef</span> <span class="meta">!important</span>;</span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">h2</span><span class="selector-class">.collect-item-title</span> &#123;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-description</span> &#123;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1</span>;</span><br><span class="line">    <span class="attribute">margin</span>: <span class="number">4px</span> <span class="number">0</span> <span class="number">8px</span> <span class="number">0</span>;</span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#3c3c43cc</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-cover</span> &#123;</span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">200px</span>;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">#f1f3f8</span>;</span><br><span class="line">    <span class="attribute">display</span>: flex;</span><br><span class="line">    <span class="attribute">justify-content</span>: center;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">img</span><span class="selector-class">.collect-item-content-item-image</span> &#123;</span><br><span class="line">    <span class="attribute">object-fit</span>: cover;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">div</span><span class="selector-id">#collect</span> &#123;</span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">26px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect-item-content-item-toolbar</span> &#123;</span><br><span class="line">    <span class="attribute">display</span>: flex;</span><br><span class="line">    <span class="attribute">justify-content</span>: space-between;</span><br><span class="line">    <span class="attribute">position</span>: absolute;</span><br><span class="line">    <span class="attribute">bottom</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">16px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">a</span><span class="selector-class">.bber-reply</span> &#123;</span><br><span class="line">    <span class="attribute">cursor</span>: pointer;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* 去除页面白色底框 */</span></span><br><span class="line"><span class="selector-tag">body</span><span class="selector-attr">[data-type=collect]</span> <span class="selector-id">#page</span> &#123;</span><br><span class="line">    <span class="attribute">border</span>: <span class="number">0</span>;</span><br><span class="line">    <span class="attribute">box-shadow</span>: none <span class="meta">!important</span>;</span><br><span class="line">    <span class="attribute">padding</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">0</span> <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-tag">h2</span> &#123;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-desc</span> &#123;</span><br><span class="line">  <span class="attribute">margin-bottom</span>: <span class="number">10px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: flex;</span><br><span class="line">  <span class="attribute">gap</span>: <span class="number">18px</span>;</span><br><span class="line">  <span class="attribute">flex-wrap</span>: wrap;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect_box</span> <span class="selector-class">.collect-div</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">margin</span>: -<span class="number">10px</span> -<span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">border-bottom</span>: none <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-tag">a</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">  <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">100%</span> / <span class="number">6</span> - <span class="number">15px</span>);</span><br><span class="line">  <span class="attribute">width</span>: <span class="built_in">var</span>(--w);</span><br><span class="line">  <span class="attribute">display</span>: flex;</span><br><span class="line">  <span class="attribute">justify-content</span>: space-between;</span><br><span class="line">  <span class="attribute">flex-direction</span>: column;</span><br><span class="line">  <span class="attribute">background-position</span>: center;</span><br><span class="line">  <span class="attribute">background-size</span>: cover;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">12px</span>;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#fff</span>;</span><br><span class="line">  <span class="attribute">transition</span>: <span class="number">0.5s</span>;</span><br><span class="line">  <span class="attribute">cursor</span>:pointer;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.3</span>);</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">transition</span>: <span class="number">0.5s</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">10px</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">:hover</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.1</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> <span class="selector-class">.collect_top</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: flex;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">align-items</span>: center;</span><br><span class="line">  <span class="attribute">justify-content</span>: space-between;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> <span class="selector-class">.collect_content</span> &#123;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">86%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> <span class="selector-class">.collect_content</span> <span class="selector-tag">span</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: block;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">18px</span>;</span><br><span class="line">  <span class="attribute">font-weight</span>: bold;</span><br><span class="line">  <span class="attribute">white-space</span>: nowrap;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">text-overflow</span>: ellipsis;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#ddd</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">10px</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">:hover</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.2</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span><span class="selector-pseudo">::after</span> &#123;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.5</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">1100px</span>) &#123;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> &#123;</span><br><span class="line">    <span class="attribute">gap</span>: <span class="number">15px</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">    <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">20%</span> - <span class="number">12px</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">900px</span>) &#123;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> &#123;</span><br><span class="line">    <span class="attribute">gap</span>: <span class="number">16px</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">    <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">25%</span> - <span class="number">12px</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>) &#123;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> &#123;</span><br><span class="line">    <span class="attribute">gap</span>: <span class="number">15px</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">    <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">100%</span> / <span class="number">3</span> - <span class="number">10px</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">500px</span>) &#123;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> &#123;</span><br><span class="line">    <span class="attribute">gap</span>: <span class="number">16px</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="selector-class">.collect</span> <span class="selector-class">.collect-list</span> <span class="selector-class">.collect_box</span> &#123;</span><br><span class="line">    <span class="attr">--w</span>: <span class="built_in">calc</span>(<span class="number">50%</span> - <span class="number">8px</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-item</span> &#123;</span><br><span class="line">  <span class="comment">/* border-bottom: none !important; */</span></span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--icedream-card-bg);</span><br><span class="line">  <span class="attribute">border</span>: <span class="built_in">var</span>(--style-border);</span><br><span class="line">  <span class="attribute">box-shadow</span>: <span class="built_in">var</span>(--icedream-shadow-border);</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">12px</span>;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">8px</span> <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">160px</span>;</span><br><span class="line">  <span class="attribute">min-height</span>: <span class="number">160px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">49%</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">clear</span>: both;</span><br><span class="line">  <span class="attribute">max-width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">10px</span> <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">border-bottom</span>: <span class="number">1px</span> <span class="number">#ddd</span> solid;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="selector-id">#hexo-collect-item3</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: flex;</span><br><span class="line">  <span class="attribute">flex-direction</span>: row;</span><br><span class="line">  <span class="attribute">flex-wrap</span>: wrap;</span><br><span class="line">  <span class="attribute">justify-content</span>: space-between;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-item</span> <span class="selector-class">.hexo-collect-picture</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-item</span> <span class="selector-class">.hexo-collect-picture</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-tabs</span> &#123;</span><br><span class="line">  <span class="attribute">display</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-title</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">  <span class="attribute">border-bottom</span>: <span class="number">0px</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-title</span> &#123;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">text-overflow</span>: ellipsis;</span><br><span class="line">  <span class="attribute">white-space</span>: nowrap;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-title</span> <span class="selector-tag">a</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="number">#f2b94b</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>) <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-pagination</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: auto;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">display</span>: flex;</span><br><span class="line">  <span class="attribute">justify-content</span>: center;</span><br><span class="line">  <span class="attribute">align-items</span>: center;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-title</span> &#123;</span><br><span class="line">  <span class="attribute">font-weight</span>: bold;</span><br><span class="line">  <span class="attribute">font-size</span>: inherit;</span><br><span class="line">  <span class="attribute">line-height</span>: <span class="number">2</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-title</span> <span class="selector-tag">a</span> &#123;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-info</span> &#123;</span><br><span class="line">  <span class="attribute">padding-left</span>: <span class="number">210px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">margin-right</span>: <span class="number">0.5rem</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-meta</span> &#123;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">0.7rem</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--Jay-secondtext);</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">0.3rem</span>;</span><br><span class="line">  <span class="attribute">line-height</span>: <span class="number">1.05</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-comments</span> &#123;</span><br><span class="line">  <span class="attribute">line-height</span>: <span class="number">1.2</span>;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">0.5rem</span>;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">0.8rem</span> <span class="meta">!important</span>;</span><br><span class="line">  -webkit-line-clamp: <span class="number">3</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: hidden;</span><br><span class="line">  <span class="attribute">text-overflow</span>: ellipsis;</span><br><span class="line">  <span class="attribute">display</span>: -webkit-box;</span><br><span class="line">  -webkit-box-orient: vertical;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-picture</span> &#123;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">10px</span> <span class="number">0</span> <span class="number">10px</span> <span class="number">10px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.hexo-collect-picture</span> <span class="selector-tag">a</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">8px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">height</span>: auto;</span><br><span class="line">  <span class="attribute">width</span>: auto\<span class="number">9</span>;</span><br><span class="line">  <span class="attribute">width</span>:<span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">overflow</span>:hidden;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* @media screen and (min-width: 1300px) &#123;</span></span><br><span class="line"><span class="comment">  .hexo-collect-item &#123;</span></span><br><span class="line"><span class="comment">      width: 32%;</span></span><br><span class="line"><span class="comment">  &#125;</span></span><br><span class="line"><span class="comment">&#125; */</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>) &#123;</span><br><span class="line">        <span class="selector-class">.hexo-collect-item</span> &#123;</span><br><span class="line">            <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">            <span class="attribute">height</span>: <span class="number">100%</span>;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="selector-class">.hexo-collect-picture</span> &#123;</span><br><span class="line">        <span class="attribute">position</span>: absolute;</span><br><span class="line">        <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">        <span class="comment">/* top: 10px; */</span></span><br><span class="line">        <span class="attribute">width</span>: <span class="number">200px</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/* .hexo-collect-info &#123;</span></span><br><span class="line"><span class="comment">        padding-left: 120px;</span></span><br><span class="line"><span class="comment">    &#125; */</span></span><br><span class="line"></span><br><span class="line">    <span class="selector-class">.hexo-collect-meta</span> &#123;</span><br><span class="line">        <span class="attribute">font-size</span>: <span class="number">12px</span>;</span><br><span class="line">        <span class="attribute">padding-right</span>: <span class="number">10px</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="selector-class">.hexo-collect-comments</span> &#123;</span><br><span class="line">        <span class="attribute">font-size</span>: <span class="number">12px</span>;</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure><h3 id="增加辅助函数"><a href="#增加辅助函数" class="headerlink" title="增加辅助函数"></a>增加辅助函数</h3><p>在<code>[blogRoot]themes\anzhiyu\scripts\helpers\page.js</code>的合适位置粘贴如下代码：</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 藏宝阁星星</span></span><br><span class="line">hexo.<span class="property">extend</span>.<span class="property">helper</span>.<span class="title function_">register</span>(<span class="string">&#x27;toStar&#x27;</span>, <span class="keyword">function</span>(<span class="params">num</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> tmp = <span class="string">&#x27;&#x27;</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="title class_">Math</span>.<span class="title function_">floor</span>(num); i++) &#123; tmp += <span class="string">&#x27;&lt;i class=&quot;fa-solid fa-star&quot;&gt;&lt;/i&gt;&#x27;</span> &#125; <span class="comment">// 整数部分加 实心星星</span></span><br><span class="line">    <span class="keyword">if</span> (num - <span class="title class_">Math</span>.<span class="title function_">floor</span>(num) != <span class="number">0</span>) tmp += <span class="string">&#x27;&lt;i class=&quot;fa-solid fa-star-half-alt&quot;&gt;&lt;/i&gt;&#x27;</span> <span class="comment">// 小数部分转成 半星</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="number">5</span> - <span class="title class_">Math</span>.<span class="title function_">ceil</span>(num); i++) &#123; tmp += <span class="string">&#x27;&lt;i class=&quot;fa-regular fa-star&quot;&gt;&lt;/i&gt;&#x27;</span> &#125; <span class="comment">// 不够5个补 空心星星</span></span><br><span class="line">    <span class="keyword">return</span> tmp</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure><h3 id="新建collect-yml"><a href="#新建collect-yml" class="headerlink" title="新建collect.yml"></a>新建collect.yml</h3><p>在<code>[blogRoot]\source\_data</code>下面新建collect.yml，弄过友链的应该都很熟悉。<br>按照如下格式配置即可(很像友链格式)</p><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="bullet">-</span> <span class="attr">class_name:</span> <span class="string">📺</span> <span class="string">电影</span></span><br><span class="line">  <span class="attr">class_desc:</span> <span class="comment">#分类描述</span></span><br><span class="line">  <span class="attr">link_list:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">让子弹飞</span> <span class="comment">#名字</span></span><br><span class="line">      <span class="attr">img:</span> <span class="string">https://t1.szrtcpa.com/upload/vod/20220313-27/fa8e1f40e62df7aa609cba34f5ee8a25.jpg</span> <span class="comment">#图片链接</span></span><br><span class="line">      <span class="attr">score:</span> <span class="number">5</span> <span class="comment"># 1-5星</span></span><br><span class="line">      <span class="attr">icon:</span> <span class="string">fa-solid</span> <span class="string">fa-film</span> <span class="comment">#左上角图标</span></span><br><span class="line">      <span class="attr">tip:</span> <span class="string">电影</span> <span class="comment"># 右上角文字</span></span><br></pre></td></tr></table></figure><h2 id="日子中自动弹窗-灰屏"><a href="#日子中自动弹窗-灰屏" class="headerlink" title="日子中自动弹窗&#x2F;灰屏"></a>日子中自动弹窗&#x2F;灰屏</h2><h3 id="方案一"><a href="#方案一" class="headerlink" title="方案一"></a>方案一</h3><p>教程来源：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://yisous.xyz/posts/7e9276a3/">Ariasakaの小窝</a></p><h4 id="day-js"><a href="#day-js" class="headerlink" title="day.js"></a>day.js</h4><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> d = <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line">m=d.<span class="title function_">getMonth</span>()+<span class="number">1</span>;</span><br><span class="line">dd=d.<span class="title function_">getDate</span>();</span><br><span class="line">y=d.<span class="title function_">getFullYear</span>();</span><br><span class="line"><span class="comment">//cookie函数</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">randomNum</span>(<span class="params">minNum,maxNum</span>)&#123; </span><br><span class="line">    <span class="keyword">switch</span>(<span class="variable language_">arguments</span>.<span class="property">length</span>)&#123; </span><br><span class="line">        <span class="keyword">case</span> <span class="number">1</span>: </span><br><span class="line">            <span class="keyword">return</span> <span class="built_in">parseInt</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>()*minNum+<span class="number">1</span>,<span class="number">10</span>); </span><br><span class="line">        <span class="keyword">break</span>; </span><br><span class="line">        <span class="keyword">case</span> <span class="number">2</span>: </span><br><span class="line">            <span class="keyword">return</span> <span class="built_in">parseInt</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>()*(maxNum-minNum+<span class="number">1</span>)+minNum,<span class="number">10</span>); </span><br><span class="line">        <span class="keyword">break</span>; </span><br><span class="line">            <span class="attr">default</span>: </span><br><span class="line">                <span class="keyword">return</span> <span class="number">0</span>; </span><br><span class="line">            <span class="keyword">break</span>; </span><br><span class="line">    &#125; </span><br><span class="line">&#125; </span><br><span class="line"><span class="comment">//纪念日</span></span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">9</span>&amp;&amp;dd==<span class="number">18</span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;勿忘国耻，振兴中华！\n\n今天是1931年9月18日九一八事变&quot;</span>+(y-<span class="number">1931</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日！\n=================================================================&quot;</span>)</span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;html&quot;</span>)[<span class="number">0</span>].<span class="title function_">setAttribute</span>(<span class="string">&quot;style&quot;</span>,<span class="string">&quot;filter: grayscale(100%);&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;今天是1931年9月18日九一八事变&quot;</span>+(y-<span class="number">1931</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日。\n勿忘国耻，振兴中华！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;    </span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">7</span>&amp;&amp;dd==<span class="number">7</span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;勿忘国耻，振兴中华！\n\n今天是1937年7月7日卢沟桥事变&quot;</span>+(y-<span class="number">1937</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日！\n=================================================================&quot;</span>)</span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;html&quot;</span>)[<span class="number">0</span>].<span class="title function_">setAttribute</span>(<span class="string">&quot;style&quot;</span>,<span class="string">&quot;filter: grayscale(100%);&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;今天是1937年7月7日卢沟桥事变&quot;</span>+(y-<span class="number">1937</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日。\n勿忘国耻，振兴中华！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;    </span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">12</span>&amp;&amp;dd==<span class="number">13</span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;勿忘国耻，振兴中华！\n\n今天是1937年12月13日南京大屠杀&quot;</span>+(y-<span class="number">1931</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日！为遇难的无辜同胞们缅怀！\n=================================================================&quot;</span>)</span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;html&quot;</span>)[<span class="number">0</span>].<span class="title function_">setAttribute</span>(<span class="string">&quot;style&quot;</span>,<span class="string">&quot;filter: grayscale(100%);&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;今天是1937年12月13日南京大屠杀&quot;</span>+(y-<span class="number">1937</span>).<span class="title function_">toString</span>()+<span class="string">&quot;周年纪念日，希望你能停下来缅怀遇难的无辜同胞们。\n勿忘国耻，振兴中华！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">8</span>&amp;&amp;dd==<span class="number">14</span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;勿忘国耻，振兴中华！\n\n今天是8月14日世界慰安妇纪念日！\n=================================================================&quot;</span>)</span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;html&quot;</span>)[<span class="number">0</span>].<span class="title function_">setAttribute</span>(<span class="string">&quot;style&quot;</span>,<span class="string">&quot;filter: grayscale(100%);&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;今天是8月14日世界慰安妇纪念日，希望你能停下来了解一下来为历史作证，为曾经的无辜妇女发声。\n勿忘国耻，振兴中华！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//节假日</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">10</span>&amp;&amp;dd&lt;=<span class="number">5</span>)&#123;<span class="comment">//国庆节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;祖国&quot;</span>+(y-<span class="number">1949</span>).<span class="title function_">toString</span>()+<span class="string">&quot;岁生日快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;祖国&quot;</span>+(y-<span class="number">1949</span>).<span class="title function_">toString</span>()+<span class="string">&quot;岁生日快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">8</span>&amp;&amp;dd==<span class="number">15</span>)&#123;<span class="comment">//搞来玩的，鬼子投降</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;鬼子投降&quot;</span>+(y-<span class="number">1945</span>).<span class="title function_">toString</span>()+<span class="string">&quot;年了！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;鬼子投降&quot;</span>+(y-<span class="number">1945</span>).<span class="title function_">toString</span>()+<span class="string">&quot;年了！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">1</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//元旦节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(y.<span class="title function_">toString</span>()+<span class="string">&quot;年元旦快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(y.<span class="title function_">toString</span>()+<span class="string">&quot;年元旦快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">3</span>&amp;&amp;dd==<span class="number">8</span>)&#123;<span class="comment">//妇女节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;各位女神们，妇女节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;各位女神们，妇女节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line">l=[<span class="string">&quot;震惊！微软让Minecraft Java免费了！&quot;</span>,<span class="string">&quot;Minecraft竟然违背Mojang的原则发布2.0！&quot;</span>,<span class="string">&quot;非常抱歉，因为不可控原因，博客将于明天停止运营，再见&quot;</span>,<span class="string">&quot;好消息，日本没了！&quot;</span>,<span class="string">&quot;美国垮了，背后原因竟是时刻心心念念想着祖国的川普！&quot;</span>,<span class="string">&quot;微软垮了！&quot;</span>]</span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(m,dd);</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">4</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//愚人节，随机谎话</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(l[<span class="title function_">randomNum</span>(<span class="number">0</span>,l.<span class="property">length</span>-<span class="number">1</span>)]);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(l[<span class="title function_">randomNum</span>(<span class="number">0</span>,l.<span class="property">length</span>-<span class="number">1</span>)]);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">5</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//劳动节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;劳动节快乐！为助力各行各业发展辛勤工作的人们致敬！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;劳动节快乐！为助力各行各业发展辛勤工作的人们致敬！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">5</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//劳动节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;劳动节快乐！为助力各行各业发展辛勤工作的人们致敬！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;劳动节快乐！为助力各行各业发展辛勤工作的人们致敬！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">5</span>&amp;&amp;dd==<span class="number">4</span>)&#123;<span class="comment">//青年节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;为有思想政治觉悟，拥护中国共产党，追求无产阶级、共产主义、马克思主义的青年们致敬！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;为有思想政治觉悟，拥护中国共产党，追求无产阶级、共产主义、马克思主义的青年们致敬&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">6</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//儿童节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;各位小朋友们，儿童节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;各位小朋友们，儿童节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">7</span>&amp;&amp;dd==<span class="number">1</span>)&#123;<span class="comment">//建党节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;中国共产党&quot;</span>+(y-<span class="number">1921</span>).<span class="title function_">toString</span>()+<span class="string">&quot;岁生日快乐&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;中国共产党&quot;</span>+(y-<span class="number">1921</span>).<span class="title function_">toString</span>()+<span class="string">&quot;岁生日快乐&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//传统节日部分</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span>(m==<span class="number">4</span>&amp;&amp;dd==<span class="number">4</span>||(m==<span class="number">4</span>&amp;&amp;dd==<span class="number">5</span>))&#123;<span class="comment">//清明节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;清明安康&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;清明安康&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> lunar=calendarFormatter.<span class="title function_">solar2lunar</span>();</span><br><span class="line"></span><br><span class="line"><span class="comment">//农历采用汉字计算，防止出现闰月导致问题</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初六&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初五&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初四&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初三&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初二&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初一&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;腊月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;三十&quot;</span>)||(lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;腊月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;廿九&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//春节，本来只有大年三十到初六，但是有时候除夕是大年二十九，所以也加上了</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(y.<span class="title function_">toString</span>()+<span class="string">&quot;年新年快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(y.<span class="title function_">toString</span>()+<span class="string">&quot;年新年快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;十五&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//元宵节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;元宵节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;元宵节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;正月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;十五&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//元宵节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;元宵节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;元宵节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;五月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初五&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//端午节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;端午节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;端午节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;七月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初七&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//七夕节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;七夕节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;七夕节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;八月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;十五&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//中秋节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;中秋节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;中秋节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>((lunar[<span class="string">&quot;IMonthCn&quot;</span>]==<span class="string">&quot;九月&quot;</span>&amp;&amp;lunar[<span class="string">&quot;IDayCn&quot;</span>]==<span class="string">&quot;初九&quot;</span>))&#123;</span><br><span class="line">    <span class="comment">//重阳节</span></span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;重阳节快乐！&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span>(<span class="variable language_">sessionStorage</span>.<span class="title function_">getItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>)!=<span class="string">&quot;1&quot;</span>)&#123;</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&quot;重阳节快乐！&quot;</span>);</span><br><span class="line">        <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&quot;isPopupWindow&quot;</span>,<span class="string">&quot;1&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h4 id="lunar-js"><a href="#lunar-js" class="headerlink" title="lunar.js"></a>lunar.js</h4><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br><span class="line">856</span><br><span class="line">857</span><br><span class="line">858</span><br><span class="line">859</span><br><span class="line">860</span><br><span class="line">861</span><br><span class="line">862</span><br><span class="line">863</span><br><span class="line">864</span><br><span class="line">865</span><br><span class="line">866</span><br><span class="line">867</span><br><span class="line">868</span><br><span class="line">869</span><br><span class="line">870</span><br><span class="line">871</span><br><span class="line">872</span><br><span class="line">873</span><br><span class="line">874</span><br><span class="line">875</span><br><span class="line">876</span><br><span class="line">877</span><br><span class="line">878</span><br><span class="line">879</span><br><span class="line">880</span><br><span class="line">881</span><br><span class="line">882</span><br><span class="line">883</span><br><span class="line">884</span><br><span class="line">885</span><br><span class="line">886</span><br><span class="line">887</span><br><span class="line">888</span><br><span class="line">889</span><br><span class="line">890</span><br><span class="line">891</span><br><span class="line">892</span><br><span class="line">893</span><br><span class="line">894</span><br><span class="line">895</span><br><span class="line">896</span><br><span class="line">897</span><br><span class="line">898</span><br><span class="line">899</span><br><span class="line">900</span><br><span class="line">901</span><br><span class="line">902</span><br><span class="line">903</span><br><span class="line">904</span><br><span class="line">905</span><br><span class="line">906</span><br><span class="line">907</span><br><span class="line">908</span><br><span class="line">909</span><br><span class="line">910</span><br><span class="line">911</span><br><span class="line">912</span><br><span class="line">913</span><br><span class="line">914</span><br><span class="line">915</span><br><span class="line">916</span><br><span class="line">917</span><br><span class="line">918</span><br><span class="line">919</span><br><span class="line">920</span><br><span class="line">921</span><br><span class="line">922</span><br><span class="line">923</span><br><span class="line">924</span><br><span class="line">925</span><br><span class="line">926</span><br><span class="line">927</span><br><span class="line">928</span><br><span class="line">929</span><br><span class="line">930</span><br><span class="line">931</span><br><span class="line">932</span><br><span class="line">933</span><br><span class="line">934</span><br><span class="line">935</span><br><span class="line">936</span><br><span class="line">937</span><br><span class="line">938</span><br><span class="line">939</span><br><span class="line">940</span><br><span class="line">941</span><br><span class="line">942</span><br><span class="line">943</span><br><span class="line">944</span><br><span class="line">945</span><br><span class="line">946</span><br><span class="line">947</span><br><span class="line">948</span><br><span class="line">949</span><br><span class="line">950</span><br><span class="line">951</span><br><span class="line">952</span><br><span class="line">953</span><br><span class="line">954</span><br><span class="line">955</span><br><span class="line">956</span><br><span class="line">957</span><br><span class="line">958</span><br><span class="line">959</span><br><span class="line">960</span><br><span class="line">961</span><br><span class="line">962</span><br><span class="line">963</span><br><span class="line">964</span><br><span class="line">965</span><br><span class="line">966</span><br><span class="line">967</span><br><span class="line">968</span><br><span class="line">969</span><br><span class="line">970</span><br><span class="line">971</span><br><span class="line">972</span><br><span class="line">973</span><br><span class="line">974</span><br><span class="line">975</span><br><span class="line">976</span><br><span class="line">977</span><br><span class="line">978</span><br><span class="line">979</span><br><span class="line">980</span><br><span class="line">981</span><br><span class="line">982</span><br><span class="line">983</span><br><span class="line">984</span><br><span class="line">985</span><br><span class="line">986</span><br><span class="line">987</span><br><span class="line">988</span><br><span class="line">989</span><br><span class="line">990</span><br><span class="line">991</span><br><span class="line">992</span><br><span class="line">993</span><br><span class="line">994</span><br><span class="line">995</span><br><span class="line">996</span><br><span class="line">997</span><br><span class="line">998</span><br><span class="line">999</span><br><span class="line">1000</span><br><span class="line">1001</span><br><span class="line">1002</span><br><span class="line">1003</span><br><span class="line">1004</span><br><span class="line">1005</span><br><span class="line">1006</span><br><span class="line">1007</span><br><span class="line">1008</span><br><span class="line">1009</span><br><span class="line">1010</span><br><span class="line">1011</span><br><span class="line">1012</span><br><span class="line">1013</span><br><span class="line">1014</span><br><span class="line">1015</span><br><span class="line">1016</span><br><span class="line">1017</span><br><span class="line">1018</span><br><span class="line">1019</span><br><span class="line">1020</span><br><span class="line">1021</span><br><span class="line">1022</span><br><span class="line">1023</span><br><span class="line">1024</span><br><span class="line">1025</span><br><span class="line">1026</span><br><span class="line">1027</span><br><span class="line">1028</span><br><span class="line">1029</span><br><span class="line">1030</span><br><span class="line">1031</span><br><span class="line">1032</span><br><span class="line">1033</span><br><span class="line">1034</span><br><span class="line">1035</span><br><span class="line">1036</span><br><span class="line">1037</span><br><span class="line">1038</span><br><span class="line">1039</span><br><span class="line">1040</span><br><span class="line">1041</span><br><span class="line">1042</span><br><span class="line">1043</span><br><span class="line">1044</span><br><span class="line">1045</span><br><span class="line">1046</span><br><span class="line">1047</span><br><span class="line">1048</span><br><span class="line">1049</span><br><span class="line">1050</span><br><span class="line">1051</span><br><span class="line">1052</span><br><span class="line">1053</span><br><span class="line">1054</span><br><span class="line">1055</span><br><span class="line">1056</span><br><span class="line">1057</span><br><span class="line">1058</span><br><span class="line">1059</span><br><span class="line">1060</span><br><span class="line">1061</span><br><span class="line">1062</span><br><span class="line">1063</span><br><span class="line">1064</span><br><span class="line">1065</span><br><span class="line">1066</span><br><span class="line">1067</span><br><span class="line">1068</span><br><span class="line">1069</span><br><span class="line">1070</span><br><span class="line">1071</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* @1900-2100区间内的公历、农历互转</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* <span class="doctag">@charset</span> <span class="variable">UTF</span>-8</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* <span class="doctag">@Author</span>  <span class="variable">jiangjiazhi</span></span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* @公历转农历：calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* @农历转公历：calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* 农历1900-2100的润大小信息表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">* <span class="doctag">@return</span> <span class="variable">Hex</span></span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> lunarInfo = [<span class="number">0x04bd8</span>, <span class="number">0x04ae0</span>, <span class="number">0x0a570</span>, <span class="number">0x054d5</span>, <span class="number">0x0d260</span>, <span class="number">0x0d950</span>, <span class="number">0x16554</span>, <span class="number">0x056a0</span>, <span class="number">0x09ad0</span>, <span class="number">0x055d2</span>, <span class="comment">// 1900-1909</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x04ae0</span>, <span class="number">0x0a5b6</span>, <span class="number">0x0a4d0</span>, <span class="number">0x0d250</span>, <span class="number">0x1d255</span>, <span class="number">0x0b540</span>, <span class="number">0x0d6a0</span>, <span class="number">0x0ada2</span>, <span class="number">0x095b0</span>, <span class="number">0x14977</span>, <span class="comment">// 1910-1919</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x04970</span>, <span class="number">0x0a4b0</span>, <span class="number">0x0b4b5</span>, <span class="number">0x06a50</span>, <span class="number">0x06d40</span>, <span class="number">0x1ab54</span>, <span class="number">0x02b60</span>, <span class="number">0x09570</span>, <span class="number">0x052f2</span>, <span class="number">0x04970</span>, <span class="comment">// 1920-1929</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x06566</span>, <span class="number">0x0d4a0</span>, <span class="number">0x0ea50</span>, <span class="number">0x06e95</span>, <span class="number">0x05ad0</span>, <span class="number">0x02b60</span>, <span class="number">0x186e3</span>, <span class="number">0x092e0</span>, <span class="number">0x1c8d7</span>, <span class="number">0x0c950</span>, <span class="comment">// 1930-1939</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0d4a0</span>, <span class="number">0x1d8a6</span>, <span class="number">0x0b550</span>, <span class="number">0x056a0</span>, <span class="number">0x1a5b4</span>, <span class="number">0x025d0</span>, <span class="number">0x092d0</span>, <span class="number">0x0d2b2</span>, <span class="number">0x0a950</span>, <span class="number">0x0b557</span>, <span class="comment">// 1940-1949</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x06ca0</span>, <span class="number">0x0b550</span>, <span class="number">0x15355</span>, <span class="number">0x04da0</span>, <span class="number">0x0a5b0</span>, <span class="number">0x14573</span>, <span class="number">0x052b0</span>, <span class="number">0x0a9a8</span>, <span class="number">0x0e950</span>, <span class="number">0x06aa0</span>, <span class="comment">// 1950-1959</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0aea6</span>, <span class="number">0x0ab50</span>, <span class="number">0x04b60</span>, <span class="number">0x0aae4</span>, <span class="number">0x0a570</span>, <span class="number">0x05260</span>, <span class="number">0x0f263</span>, <span class="number">0x0d950</span>, <span class="number">0x05b57</span>, <span class="number">0x056a0</span>, <span class="comment">// 1960-1969</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x096d0</span>, <span class="number">0x04dd5</span>, <span class="number">0x04ad0</span>, <span class="number">0x0a4d0</span>, <span class="number">0x0d4d4</span>, <span class="number">0x0d250</span>, <span class="number">0x0d558</span>, <span class="number">0x0b540</span>, <span class="number">0x0b6a0</span>, <span class="number">0x195a6</span>, <span class="comment">// 1970-1979</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x095b0</span>, <span class="number">0x049b0</span>, <span class="number">0x0a974</span>, <span class="number">0x0a4b0</span>, <span class="number">0x0b27a</span>, <span class="number">0x06a50</span>, <span class="number">0x06d40</span>, <span class="number">0x0af46</span>, <span class="number">0x0ab60</span>, <span class="number">0x09570</span>, <span class="comment">// 1980-1989</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x04af5</span>, <span class="number">0x04970</span>, <span class="number">0x064b0</span>, <span class="number">0x074a3</span>, <span class="number">0x0ea50</span>, <span class="number">0x06b58</span>, <span class="number">0x05ac0</span>, <span class="number">0x0ab60</span>, <span class="number">0x096d5</span>, <span class="number">0x092e0</span>, <span class="comment">// 1990-1999</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0c960</span>, <span class="number">0x0d954</span>, <span class="number">0x0d4a0</span>, <span class="number">0x0da50</span>, <span class="number">0x07552</span>, <span class="number">0x056a0</span>, <span class="number">0x0abb7</span>, <span class="number">0x025d0</span>, <span class="number">0x092d0</span>, <span class="number">0x0cab5</span>, <span class="comment">// 2000-2009</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0a950</span>, <span class="number">0x0b4a0</span>, <span class="number">0x0baa4</span>, <span class="number">0x0ad50</span>, <span class="number">0x055d9</span>, <span class="number">0x04ba0</span>, <span class="number">0x0a5b0</span>, <span class="number">0x15176</span>, <span class="number">0x052b0</span>, <span class="number">0x0a930</span>, <span class="comment">// 2010-2019</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x07954</span>, <span class="number">0x06aa0</span>, <span class="number">0x0ad50</span>, <span class="number">0x05b52</span>, <span class="number">0x04b60</span>, <span class="number">0x0a6e6</span>, <span class="number">0x0a4e0</span>, <span class="number">0x0d260</span>, <span class="number">0x0ea65</span>, <span class="number">0x0d530</span>, <span class="comment">// 2020-2029</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x05aa0</span>, <span class="number">0x076a3</span>, <span class="number">0x096d0</span>, <span class="number">0x04afb</span>, <span class="number">0x04ad0</span>, <span class="number">0x0a4d0</span>, <span class="number">0x1d0b6</span>, <span class="number">0x0d250</span>, <span class="number">0x0d520</span>, <span class="number">0x0dd45</span>, <span class="comment">// 2030-2039</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0b5a0</span>, <span class="number">0x056d0</span>, <span class="number">0x055b2</span>, <span class="number">0x049b0</span>, <span class="number">0x0a577</span>, <span class="number">0x0a4b0</span>, <span class="number">0x0aa50</span>, <span class="number">0x1b255</span>, <span class="number">0x06d20</span>, <span class="number">0x0ada0</span>, <span class="comment">// 2040-2049</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x14b63</span>, <span class="number">0x09370</span>, <span class="number">0x049f8</span>, <span class="number">0x04970</span>, <span class="number">0x064b0</span>, <span class="number">0x168a6</span>, <span class="number">0x0ea50</span>, <span class="number">0x06b20</span>, <span class="number">0x1a6c4</span>, <span class="number">0x0aae0</span>, <span class="comment">// 2050-2059</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0a2e0</span>, <span class="number">0x0d2e3</span>, <span class="number">0x0c960</span>, <span class="number">0x0d557</span>, <span class="number">0x0d4a0</span>, <span class="number">0x0da50</span>, <span class="number">0x05d55</span>, <span class="number">0x056a0</span>, <span class="number">0x0a6d0</span>, <span class="number">0x055d4</span>, <span class="comment">// 2060-2069</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x052d0</span>, <span class="number">0x0a9b8</span>, <span class="number">0x0a950</span>, <span class="number">0x0b4a0</span>, <span class="number">0x0b6a6</span>, <span class="number">0x0ad50</span>, <span class="number">0x055a0</span>, <span class="number">0x0aba4</span>, <span class="number">0x0a5b0</span>, <span class="number">0x052b0</span>, <span class="comment">// 2070-2079</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0b273</span>, <span class="number">0x06930</span>, <span class="number">0x07337</span>, <span class="number">0x06aa0</span>, <span class="number">0x0ad50</span>, <span class="number">0x14b55</span>, <span class="number">0x04b60</span>, <span class="number">0x0a570</span>, <span class="number">0x054e4</span>, <span class="number">0x0d160</span>, <span class="comment">// 2080-2089</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0e968</span>, <span class="number">0x0d520</span>, <span class="number">0x0daa0</span>, <span class="number">0x16aa6</span>, <span class="number">0x056d0</span>, <span class="number">0x04ae0</span>, <span class="number">0x0a9d4</span>, <span class="number">0x0a2d0</span>, <span class="number">0x0d150</span>, <span class="number">0x0f252</span>, <span class="comment">// 2090-2099</span></span><br><span class="line"></span><br><span class="line">    <span class="number">0x0d520</span>] <span class="comment">// 2100</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> solarMonth = [<span class="number">31</span>, <span class="number">28</span>, <span class="number">31</span>, <span class="number">30</span>, <span class="number">31</span>, <span class="number">30</span>, <span class="number">31</span>, <span class="number">31</span>, <span class="number">30</span>, <span class="number">31</span>, <span class="number">30</span>, <span class="number">31</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 天干地支之天干速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property trans[&#x27;甲&#x27;,&#x27;乙&#x27;,&#x27;丙&#x27;,&#x27;丁&#x27;,&#x27;戊&#x27;,&#x27;己&#x27;,&#x27;庚&#x27;,&#x27;辛&#x27;,&#x27;壬&#x27;,&#x27;癸&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">Gan</span> = [<span class="string">&#x27;\u7532&#x27;</span>, <span class="string">&#x27;\u4e59&#x27;</span>, <span class="string">&#x27;\u4e19&#x27;</span>, <span class="string">&#x27;\u4e01&#x27;</span>, <span class="string">&#x27;\u620a&#x27;</span>, <span class="string">&#x27;\u5df1&#x27;</span>, <span class="string">&#x27;\u5e9a&#x27;</span>, <span class="string">&#x27;\u8f9b&#x27;</span>, <span class="string">&#x27;\u58ec&#x27;</span>, <span class="string">&#x27;\u7678&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 天干地支之地支速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span>[&#x27;子&#x27;,&#x27;丑&#x27;,&#x27;寅&#x27;,&#x27;卯&#x27;,&#x27;辰&#x27;,&#x27;巳&#x27;,&#x27;午&#x27;,&#x27;未&#x27;,&#x27;申&#x27;,&#x27;酉&#x27;,&#x27;戌&#x27;,&#x27;亥&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">Zhi</span> = [<span class="string">&#x27;\u5b50&#x27;</span>, <span class="string">&#x27;\u4e11&#x27;</span>, <span class="string">&#x27;\u5bc5&#x27;</span>, <span class="string">&#x27;\u536f&#x27;</span>, <span class="string">&#x27;\u8fb0&#x27;</span>, <span class="string">&#x27;\u5df3&#x27;</span>, <span class="string">&#x27;\u5348&#x27;</span>, <span class="string">&#x27;\u672a&#x27;</span>, <span class="string">&#x27;\u7533&#x27;</span>, <span class="string">&#x27;\u9149&#x27;</span>, <span class="string">&#x27;\u620c&#x27;</span>, <span class="string">&#x27;\u4ea5&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 天干地支之地支速查表&lt;=&gt;生肖</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span>[&#x27;鼠&#x27;,&#x27;牛&#x27;,&#x27;虎&#x27;,&#x27;兔&#x27;,&#x27;龙&#x27;,&#x27;蛇&#x27;,&#x27;马&#x27;,&#x27;羊&#x27;,&#x27;猴&#x27;,&#x27;鸡&#x27;,&#x27;狗&#x27;,&#x27;猪&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">Animals</span> = [<span class="string">&#x27;\u9f20&#x27;</span>, <span class="string">&#x27;\u725b&#x27;</span>, <span class="string">&#x27;\u864e&#x27;</span>, <span class="string">&#x27;\u5154&#x27;</span>, <span class="string">&#x27;\u9f99&#x27;</span>, <span class="string">&#x27;\u86c7&#x27;</span>, <span class="string">&#x27;\u9a6c&#x27;</span>, <span class="string">&#x27;\u7f8a&#x27;</span>, <span class="string">&#x27;\u7334&#x27;</span>, <span class="string">&#x27;\u9e21&#x27;</span>, <span class="string">&#x27;\u72d7&#x27;</span>, <span class="string">&#x27;\u732a&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 24节气速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span>[&#x27;小寒&#x27;,&#x27;大寒&#x27;,&#x27;立春&#x27;,&#x27;雨水&#x27;,&#x27;惊蛰&#x27;,&#x27;春分&#x27;,&#x27;清明&#x27;,&#x27;谷雨&#x27;,&#x27;立夏&#x27;,&#x27;小满&#x27;,&#x27;芒种&#x27;,&#x27;夏至&#x27;,&#x27;小暑&#x27;,&#x27;大暑&#x27;,&#x27;立秋&#x27;,&#x27;处暑&#x27;,&#x27;白露&#x27;,&#x27;秋分&#x27;,&#x27;寒露&#x27;,&#x27;霜降&#x27;,&#x27;立冬&#x27;,&#x27;小雪&#x27;,&#x27;大雪&#x27;,&#x27;冬至&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> solarTerm = [<span class="string">&#x27;\u5c0f\u5bd2&#x27;</span>, <span class="string">&#x27;\u5927\u5bd2&#x27;</span>, <span class="string">&#x27;\u7acb\u6625&#x27;</span>, <span class="string">&#x27;\u96e8\u6c34&#x27;</span>, <span class="string">&#x27;\u60ca\u86f0&#x27;</span>, <span class="string">&#x27;\u6625\u5206&#x27;</span>, <span class="string">&#x27;\u6e05\u660e&#x27;</span>, <span class="string">&#x27;\u8c37\u96e8&#x27;</span>, <span class="string">&#x27;\u7acb\u590f&#x27;</span>, <span class="string">&#x27;\u5c0f\u6ee1&#x27;</span>, <span class="string">&#x27;\u8292\u79cd&#x27;</span>, <span class="string">&#x27;\u590f\u81f3&#x27;</span>, <span class="string">&#x27;\u5c0f\u6691&#x27;</span>, <span class="string">&#x27;\u5927\u6691&#x27;</span>, <span class="string">&#x27;\u7acb\u79cb&#x27;</span>, <span class="string">&#x27;\u5904\u6691&#x27;</span>, <span class="string">&#x27;\u767d\u9732&#x27;</span>, <span class="string">&#x27;\u79cb\u5206&#x27;</span>, <span class="string">&#x27;\u5bd2\u9732&#x27;</span>, <span class="string">&#x27;\u971c\u964d&#x27;</span>, <span class="string">&#x27;\u7acb\u51ac&#x27;</span>, <span class="string">&#x27;\u5c0f\u96ea&#x27;</span>, <span class="string">&#x27;\u5927\u96ea&#x27;</span>, <span class="string">&#x27;\u51ac\u81f3&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 1900-2100各年的24节气日期速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> 0x string For splice</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> sTermInfo = [<span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c3598082c95f8c965cc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bd0b06bdb0722c965ce1cfcc920f&#x27;</span>, <span class="string">&#x27;b027097bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bcf97c359801ec95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd0b06bdb0722c965ce1cfcc920f&#x27;</span>, <span class="string">&#x27;b027097bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c359801ec95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd0b06bdb0722c965ce1cfcc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;b027097bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;9778397bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec95f8c965cc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bd09801d98082c95f8e1cfcc920f&#x27;</span>, <span class="string">&#x27;97bd097bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd197c36c9210c9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec95f8c965cc920e&#x27;</span>, <span class="string">&#x27;97bd09801d98082c95f8e1cfcc920f&#x27;</span>, <span class="string">&#x27;97bd097bd097c36b0b6fc9210c8dc2&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36c9210c9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec95f8c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c3598082c95f8e1cfcc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bd097bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd097c36c9210c9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bcf97c3598082c95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd097bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c3598082c95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd097bd097c35b0b6fc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c359801ec95f8c965cc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bd097bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bcf97c359801ec95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd097bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf97c359801ec95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd097bd07f595b0b6fc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd19801ec9210c9274c920e&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec95f8c965cc920f&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bd07f5307f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd097c36c9210c9274c920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec95f8c965cc920f&#x27;</span>, <span class="string">&#x27;97bd07f5307f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c36b0b6fc9210c8dc2&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36c9210c9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bd07f1487f595b0b0bc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bcf7f1487f595b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf7f1487f595b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>, <span class="string">&#x27;97bcf7f1487f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd19801ec9210c965cc920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97bcf7f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b97bd19801ec9210c9274c920e&#x27;</span>, <span class="string">&#x27;97bcf7f0e47f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9210c91aa&#x27;</span>, <span class="string">&#x27;97b6b97bd197c36c9210c9274c920e&#x27;</span>, <span class="string">&#x27;97bcf7f0e47f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd097c36c9210c9274c920e&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f5307f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c36b0b6fc9210c8dc2&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b70c9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e37f1487f595b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd097c35b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e27f1487f595b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>, <span class="string">&#x27;97b6b7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9274c91aa&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;97b6b7f0e47f531b0723b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;9778397bd097c36b0b6fc9210c91aa&#x27;</span>, <span class="string">&#x27;97b6b7f0e47f149b0723b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0723b0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;9778397bd097c36b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;977837f0e37f149b0723b0787b0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f5307f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc9210c8dc2&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;977837f0e37f14998082b0787b0721&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e37f1487f595b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd097c35b0b6fc9210c8dc2&#x27;</span>, <span class="string">&#x27;977837f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>, <span class="string">&#x27;977837f0e37f14998082b0787b06bd&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd097c35b0b6fc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;977837f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;977837f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;977837f0e37f14998082b0787b06bd&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f149b0723b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;977837f0e37f14998082b0723b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e37f149b0723b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0723b0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e397bd07f595b0b0bc920fb0722&#x27;</span>, <span class="string">&#x27;977837f0e37f14898082b0723b02d5&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f1487f595b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f0e37f14898082b0723b02d5&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7ec967f0e37f14998082b0787b0721&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f1487f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e37f0e37f14898082b0723b02d5&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e37f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f0e37f14898082b072297c35&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f0e37f14898082b072297c35&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e37f0e366aa89801eb072297c35&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f149b0723b0787b0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f0e366aa89801eb072297c35&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0723b06bd&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f149b0723b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e37f0e366aa89801eb072297c35&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7ec967f0e37f14998082b0723b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e37f14998083b0787b0721&#x27;</span>, <span class="string">&#x27;7f0e27f0e47f531b0723b0b6fb0722&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e37f0e366aa89801eb072297c35&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14898082b0723b02d5&#x27;</span>, <span class="string">&#x27;7f07e7f0e37f14998082b0787b0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e36665b66aa89801e9808297c35&#x27;</span>, <span class="string">&#x27;665f67f0e37f14898082b0723b02d5&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7ec967f0e37f14998082b0787b0721&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0722&#x27;</span>, <span class="string">&#x27;7f0e36665b66a449801e9808297c35&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;665f67f0e37f14898082b0723b02d5&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f0e36665b66a449801e9808297c35&#x27;</span>, <span class="string">&#x27;665f67f0e37f14898082b072297c35&#x27;</span>, <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e26665b66a449801e9808297c35&#x27;</span>, <span class="string">&#x27;665f67f0e37f1489801eb072297c35&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    <span class="string">&#x27;7ec967f0e37f14998082b0787b06bd&#x27;</span>, <span class="string">&#x27;7f07e7f0e47f531b0723b0b6fb0721&#x27;</span>, <span class="string">&#x27;7f0e27f1487f531b0b0bb0b6fb0722&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">   * 数字转中文速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span> [&#x27;日&#x27;,&#x27;一&#x27;,&#x27;二&#x27;,&#x27;三&#x27;,&#x27;四&#x27;,&#x27;五&#x27;,&#x27;六&#x27;,&#x27;七&#x27;,&#x27;八&#x27;,&#x27;九&#x27;,&#x27;十&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">   */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> nStr1 = [<span class="string">&#x27;\u65e5&#x27;</span>, <span class="string">&#x27;\u4e00&#x27;</span>, <span class="string">&#x27;\u4e8c&#x27;</span>, <span class="string">&#x27;\u4e09&#x27;</span>, <span class="string">&#x27;\u56db&#x27;</span>, <span class="string">&#x27;\u4e94&#x27;</span>, <span class="string">&#x27;\u516d&#x27;</span>, <span class="string">&#x27;\u4e03&#x27;</span>, <span class="string">&#x27;\u516b&#x27;</span>, <span class="string">&#x27;\u4e5d&#x27;</span>, <span class="string">&#x27;\u5341&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 日期转农历称呼速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span> [&#x27;初&#x27;,&#x27;十&#x27;,&#x27;廿&#x27;,&#x27;卅&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> nStr2 = [<span class="string">&#x27;\u521d&#x27;</span>, <span class="string">&#x27;\u5341&#x27;</span>, <span class="string">&#x27;\u5eff&#x27;</span>, <span class="string">&#x27;\u5345&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 月份转农历称呼速查表</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@Array</span> Of Property</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@trans</span> [&#x27;正&#x27;,&#x27;一&#x27;,&#x27;二&#x27;,&#x27;三&#x27;,&#x27;四&#x27;,&#x27;五&#x27;,&#x27;六&#x27;,&#x27;七&#x27;,&#x27;八&#x27;,&#x27;九&#x27;,&#x27;十&#x27;,&#x27;冬&#x27;,&#x27;腊&#x27;]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> nStr3 = [<span class="string">&#x27;\u6b63&#x27;</span>, <span class="string">&#x27;\u4e8c&#x27;</span>, <span class="string">&#x27;\u4e09&#x27;</span>, <span class="string">&#x27;\u56db&#x27;</span>, <span class="string">&#x27;\u4e94&#x27;</span>, <span class="string">&#x27;\u516d&#x27;</span>, <span class="string">&#x27;\u4e03&#x27;</span>, <span class="string">&#x27;\u516b&#x27;</span>, <span class="string">&#x27;\u4e5d&#x27;</span>, <span class="string">&#x27;\u5341&#x27;</span>, <span class="string">&#x27;\u51ac&#x27;</span>, <span class="string">&#x27;\u814a&#x27;</span>]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 返回农历y年一整年的总天数</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar Year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">   * <span class="doctag">@return</span> <span class="variable">Number</span></span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var count = calendar.lYearDays(1987) ;//count=387</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">lYearDays</span> (y) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> i</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> sum = <span class="number">348</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> (i = <span class="number">0x8000</span>; i &gt; <span class="number">0x8</span>; i &gt;&gt;= <span class="number">1</span>) &#123; sum += (lunarInfo[y - <span class="number">1900</span>] &amp; i) ? <span class="number">1</span> : <span class="number">0</span> &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> (sum + <span class="title function_">leapDays</span>(y))</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 返回农历y年闰月是哪个月；若y年没有闰月 则返回0</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar Year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Number (0-12)</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">   * <span class="doctag">@eg</span>:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">leapMonth</span> (y) &#123; <span class="comment">// 闰字编码 \u95f0</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> (lunarInfo[y - <span class="number">1900</span>] &amp; <span class="number">0xf</span>)</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 返回农历y年闰月的天数 若该年没有闰月则返回0</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar Year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Number (0、29、30)</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">leapDays</span> (y) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (<span class="title function_">leapMonth</span>(y)) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> ((lunarInfo[y - <span class="number">1900</span>] &amp; <span class="number">0x10000</span>) ? <span class="number">30</span> : <span class="number">29</span>)</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> (<span class="number">0</span>)</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 返回农历y年m月（非闰月）的总天数，计算m为闰月时的天数请使用leapDays方法</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar Year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Number (-1、29、30)</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">   * <span class="doctag">@eg</span>:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">monthDays</span> (y, m) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (m &gt; <span class="number">12</span> || m &lt; <span class="number">1</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125;<span class="comment">// 月份参数从1至12，参数错误返回-1</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> ((lunarInfo[y - <span class="number">1900</span>] &amp; (<span class="number">0x10000</span> &gt;&gt; m)) ? <span class="number">30</span> : <span class="number">29</span>)</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 返回公历(!)y年m月的天数</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> solar Year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Number (-1、28、29、30、31)</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">solarDays</span> (y, m) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (m &gt; <span class="number">12</span> || m &lt; <span class="number">1</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125; <span class="comment">// 若参数错误 返回-1</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> ms = m - <span class="number">1</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (ms === <span class="number">1</span>) &#123; <span class="comment">// 2月份的闰平规律测算后确认返回28或29</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> (((y % <span class="number">4</span> === <span class="number">0</span>) &amp;&amp; (y % <span class="number">100</span> !== <span class="number">0</span>) || (y % <span class="number">400</span> === <span class="number">0</span>)) ? <span class="number">29</span> : <span class="number">28</span>)</span><br><span class="line"></span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> (solarMonth[ms])</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 农历年份转换为干支纪年</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span>  lYear 农历年的年份数</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">toGanZhiYear</span> (lYear) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> ganKey = (lYear - <span class="number">3</span>) % <span class="number">10</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> zhiKey = (lYear - <span class="number">3</span>) % <span class="number">12</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (ganKey === <span class="number">0</span>) ganKey = <span class="number">10</span> <span class="comment">// 如果余数为0则为最后一个天干</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (zhiKey === <span class="number">0</span>) zhiKey = <span class="number">12</span> <span class="comment">// 如果余数为0则为最后一个地支</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Gan</span>[ganKey - <span class="number">1</span>] + <span class="title class_">Zhi</span>[zhiKey - <span class="number">1</span>]</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 公历月、日判断所属星座</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span>  cMonth [description]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span>  cDay [description]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">toAstro</span> (cMonth, cDay) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> s = <span class="string">&#x27;\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf&#x27;</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> arr = [<span class="number">20</span>, <span class="number">19</span>, <span class="number">21</span>, <span class="number">21</span>, <span class="number">21</span>, <span class="number">22</span>, <span class="number">23</span>, <span class="number">23</span>, <span class="number">23</span>, <span class="number">23</span>, <span class="number">22</span>, <span class="number">22</span>]</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> s.<span class="title function_">substr</span>(cMonth * <span class="number">2</span> - (cDay &lt; arr[cMonth - <span class="number">1</span>] ? <span class="number">2</span> : <span class="number">0</span>), <span class="number">2</span>) + <span class="string">&#x27;\u5ea7&#x27;</span> <span class="comment">// 座</span></span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 传入offset偏移量返回干支</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> offset 相对甲子的偏移量</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">toGanZhi</span> (offset) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Gan</span>[offset % <span class="number">10</span>] + <span class="title class_">Zhi</span>[offset % <span class="number">12</span>]</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 传入公历(!)y年获得该年第n个节气的公历日期</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> y公历年(1900-2100)；n二十四节气中的第几个节气(1~24)；从n=1(小寒)算起</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> day Number</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">getTerm</span> (y, n) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (y &lt; <span class="number">1900</span> || y &gt; <span class="number">2100</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (n &lt; <span class="number">1</span> || n &gt; <span class="number">24</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _table = sTermInfo[y - <span class="number">1900</span>]</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _info = [</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">5</span>)).<span class="title function_">toString</span>(),</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">5</span>, <span class="number">5</span>)).<span class="title function_">toString</span>(),</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">10</span>, <span class="number">5</span>)).<span class="title function_">toString</span>(),</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">15</span>, <span class="number">5</span>)).<span class="title function_">toString</span>(),</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">20</span>, <span class="number">5</span>)).<span class="title function_">toString</span>(),</span><br><span class="line"></span><br><span class="line">      <span class="built_in">parseInt</span>(<span class="string">&#x27;0x&#x27;</span> + _table.<span class="title function_">substr</span>(<span class="number">25</span>, <span class="number">5</span>)).<span class="title function_">toString</span>()</span><br><span class="line"></span><br><span class="line">    ]</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> _calday = [</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">0</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">0</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">0</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">0</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">      _info[<span class="number">1</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">1</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">1</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">1</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">      _info[<span class="number">2</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">2</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">2</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">2</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">      _info[<span class="number">3</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">3</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">3</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">3</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">      _info[<span class="number">4</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">4</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">4</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">4</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">      _info[<span class="number">5</span>].<span class="title function_">substr</span>(<span class="number">0</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">5</span>].<span class="title function_">substr</span>(<span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">5</span>].<span class="title function_">substr</span>(<span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"></span><br><span class="line">      _info[<span class="number">5</span>].<span class="title function_">substr</span>(<span class="number">4</span>, <span class="number">2</span>)</span><br><span class="line"></span><br><span class="line">    ]</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="built_in">parseInt</span>(_calday[n - <span class="number">1</span>])</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 传入农历数字月份返回汉语通俗表示法</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar month</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth=&#x27;腊月&#x27;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">toChinaMonth</span> (m) &#123; <span class="comment">// 月 =&gt; \u6708</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (m &gt; <span class="number">12</span> || m &lt; <span class="number">1</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125; <span class="comment">// 若参数错误 返回-1</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> s = nStr3[m - <span class="number">1</span>]</span><br><span class="line"></span><br><span class="line">    s += <span class="string">&#x27;\u6708&#x27;</span> <span class="comment">// 加上月字</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> s</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 传入农历日期数字返回汉字表示法</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> lunar day</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var cnDay = calendar.toChinaDay(21) ;//cnMonth=&#x27;廿一&#x27;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">toChinaDay</span> (d) &#123; <span class="comment">// 日 =&gt; \u65e5</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> s</span><br><span class="line"></span><br><span class="line">    <span class="keyword">switch</span> (d) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">case</span> <span class="number">10</span>:</span><br><span class="line"></span><br><span class="line">        s = <span class="string">&#x27;\u521d\u5341&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">case</span> <span class="number">20</span>:</span><br><span class="line"></span><br><span class="line">        s = <span class="string">&#x27;\u4e8c\u5341&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">case</span> <span class="number">30</span>:</span><br><span class="line"></span><br><span class="line">        s = <span class="string">&#x27;\u4e09\u5341&#x27;</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">default</span> :</span><br><span class="line"></span><br><span class="line">        s = nStr2[<span class="title class_">Math</span>.<span class="title function_">floor</span>(d / <span class="number">10</span>)]</span><br><span class="line"></span><br><span class="line">        s += nStr1[d % <span class="number">10</span>]</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> (s)</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 年份转生肖[!仅能大致转换] =&gt; 精确划分生肖分界线是“立春”</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> y year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> Cn string</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:var animal = calendar.getAnimal(1987) ;//animal=&#x27;兔&#x27;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">getAnimal</span> (y) &#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Animals</span>[(y - <span class="number">4</span>) % <span class="number">12</span>]</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * 传入阳历年月日获得详细的公历、农历object信息 &lt;=&gt;JSON</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> y  solar year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> m  solar month</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@param</span> d  solar day</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@return</span> JSON object</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  * <span class="doctag">@eg</span>:console.log(calendar.solar2lunar(1987,11,01));</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">solar2lunar</span> (y, m, d) &#123; <span class="comment">// 参数区间1900.1.31~2100.12.31</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 年份限定、上限</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (y &lt; <span class="number">1900</span> || y &gt; <span class="number">2100</span>) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> -<span class="number">1</span> <span class="comment">// undefined转换为数字变为NaN</span></span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 公历传参最下限</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (y === <span class="number">1900</span> &amp;&amp; m === <span class="number">1</span> &amp;&amp; d &lt; <span class="number">31</span>) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> -<span class="number">1</span></span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 未传参  获得当天</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> objDate = <span class="literal">null</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (!y) &#123;</span><br><span class="line"></span><br><span class="line">      objDate = <span class="keyword">new</span> <span class="title class_">Date</span>()</span><br><span class="line"></span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"></span><br><span class="line">      objDate = <span class="keyword">new</span> <span class="title class_">Date</span>(y, <span class="built_in">parseInt</span>(m) - <span class="number">1</span>, d)</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> i</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> leap = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> temp = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 修正ymd参数</span></span><br><span class="line"></span><br><span class="line">    y = objDate.<span class="title function_">getFullYear</span>()</span><br><span class="line"></span><br><span class="line">    m = objDate.<span class="title function_">getMonth</span>() + <span class="number">1</span></span><br><span class="line"></span><br><span class="line">    d = objDate.<span class="title function_">getDate</span>()</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> offset = (<span class="title class_">Date</span>.<span class="title function_">UTC</span>(objDate.<span class="title function_">getFullYear</span>(), objDate.<span class="title function_">getMonth</span>(), objDate.<span class="title function_">getDate</span>()) - <span class="title class_">Date</span>.<span class="title function_">UTC</span>(<span class="number">1900</span>, <span class="number">0</span>, <span class="number">31</span>)) / <span class="number">86400000</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> (i = <span class="number">1900</span>; i &lt; <span class="number">2101</span> &amp;&amp; offset &gt; <span class="number">0</span>; i++) &#123;</span><br><span class="line"></span><br><span class="line">      temp = <span class="title function_">lYearDays</span>(i)</span><br><span class="line"></span><br><span class="line">      offset -= temp</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (offset &lt; <span class="number">0</span>) &#123;</span><br><span class="line"></span><br><span class="line">      offset += temp; i--</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 是否今天</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> isTodayObj = <span class="keyword">new</span> <span class="title class_">Date</span>()</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> isToday = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (isTodayObj.<span class="title function_">getFullYear</span>() === y &amp;&amp; isTodayObj.<span class="title function_">getMonth</span>() + <span class="number">1</span> === m &amp;&amp; isTodayObj.<span class="title function_">getDate</span>() === d) &#123;</span><br><span class="line"></span><br><span class="line">      isToday = <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 星期几</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> nWeek = objDate.<span class="title function_">getDay</span>()</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> cWeek = nStr1[nWeek]</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 数字表示周几顺应天朝周一开始的惯例</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (nWeek === <span class="number">0</span>) &#123;</span><br><span class="line"></span><br><span class="line">      nWeek = <span class="number">7</span></span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 农历年</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> year = i</span><br><span class="line"></span><br><span class="line">    leap = <span class="title function_">leapMonth</span>(i) <span class="comment">// 闰哪个月</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> isLeap = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 效验闰月</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> (i = <span class="number">1</span>; i &lt; <span class="number">13</span> &amp;&amp; offset &gt; <span class="number">0</span>; i++) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="comment">// 闰月</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (leap &gt; <span class="number">0</span> &amp;&amp; i === (leap + <span class="number">1</span>) &amp;&amp; isLeap === <span class="literal">false</span>) &#123;</span><br><span class="line"></span><br><span class="line">        --i</span><br><span class="line"></span><br><span class="line">        isLeap = <span class="literal">true</span>; temp = <span class="title function_">leapDays</span>(year) <span class="comment">// 计算农历闰月天数</span></span><br><span class="line"></span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"></span><br><span class="line">        temp = <span class="title function_">monthDays</span>(year, i)<span class="comment">// 计算农历普通月天数</span></span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="comment">// 解除闰月</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (isLeap === <span class="literal">true</span> &amp;&amp; i === (leap + <span class="number">1</span>)) &#123; isLeap = <span class="literal">false</span> &#125;</span><br><span class="line"></span><br><span class="line">      offset -= temp</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 闰月导致数组下标重叠取反</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (offset === <span class="number">0</span> &amp;&amp; leap &gt; <span class="number">0</span> &amp;&amp; i === leap + <span class="number">1</span>) &#123;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (isLeap) &#123;</span><br><span class="line"></span><br><span class="line">        isLeap = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"></span><br><span class="line">        isLeap = <span class="literal">true</span>; --i</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (offset &lt; <span class="number">0</span>) &#123;</span><br><span class="line"></span><br><span class="line">      offset += temp; --i</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 农历月</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> month = i</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 农历日</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> day = offset + <span class="number">1</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 天干地支处理</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> sm = m - <span class="number">1</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> gzY = <span class="title function_">toGanZhiYear</span>(year)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 当月的两个节气</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> firstNode = <span class="title function_">getTerm</span>(y, (m * <span class="number">2</span> - <span class="number">1</span>)) <span class="comment">// 返回当月「节」为几日开始</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> secondNode = <span class="title function_">getTerm</span>(y, (m * <span class="number">2</span>)) <span class="comment">// 返回当月「节」为几日开始</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">// 依据12节气修正干支月</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> gzM = <span class="title function_">toGanZhi</span>((y - <span class="number">1900</span>) * <span class="number">12</span> + m + <span class="number">11</span>)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (d &gt;= firstNode) &#123;</span><br><span class="line"></span><br><span class="line">      gzM = <span class="title function_">toGanZhi</span>((y - <span class="number">1900</span>) * <span class="number">12</span> + m + <span class="number">12</span>)</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 传入的日期的节气与否</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> isTerm = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> <span class="title class_">Term</span> = <span class="literal">null</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (firstNode === d) &#123;</span><br><span class="line"></span><br><span class="line">      isTerm = <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">      <span class="title class_">Term</span> = solarTerm[m * <span class="number">2</span> - <span class="number">2</span>]</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (secondNode === d) &#123;</span><br><span class="line"></span><br><span class="line">      isTerm = <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">      <span class="title class_">Term</span> = solarTerm[m * <span class="number">2</span> - <span class="number">1</span>]</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 日柱 当月一日与 1900/1/1 相差天数</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> dayCyclical = <span class="title class_">Date</span>.<span class="title function_">UTC</span>(y, sm, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>) / <span class="number">86400000</span> + <span class="number">25567</span> + <span class="number">10</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> gzD = <span class="title function_">toGanZhi</span>(dayCyclical + d - <span class="number">1</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 该日期所属的星座</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> astro = <span class="title function_">toAstro</span>(m, d)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> &#123;<span class="string">&#x27;lYear&#x27;</span>: year, <span class="string">&#x27;lMonth&#x27;</span>: month, <span class="string">&#x27;lDay&#x27;</span>: day, <span class="string">&#x27;Animal&#x27;</span>: <span class="title function_">getAnimal</span>(year), <span class="string">&#x27;IMonthCn&#x27;</span>: (isLeap ? <span class="string">&#x27;\u95f0&#x27;</span> : <span class="string">&#x27;&#x27;</span>) + <span class="title function_">toChinaMonth</span>(month), <span class="string">&#x27;IDayCn&#x27;</span>: <span class="title function_">toChinaDay</span>(day), <span class="string">&#x27;cYear&#x27;</span>: y, <span class="string">&#x27;cMonth&#x27;</span>: m, <span class="string">&#x27;cDay&#x27;</span>: d, <span class="string">&#x27;gzYear&#x27;</span>: gzY, <span class="string">&#x27;gzMonth&#x27;</span>: gzM, <span class="string">&#x27;gzDay&#x27;</span>: gzD, <span class="string">&#x27;isToday&#x27;</span>: isToday, <span class="string">&#x27;isLeap&#x27;</span>: isLeap, <span class="string">&#x27;nWeek&#x27;</span>: nWeek, <span class="string">&#x27;ncWeek&#x27;</span>: <span class="string">&#x27;\u661f\u671f&#x27;</span> + cWeek, <span class="string">&#x27;isTerm&#x27;</span>: isTerm, <span class="string">&#x27;Term&#x27;</span>: <span class="title class_">Term</span>, <span class="string">&#x27;astro&#x27;</span>: astro&#125;</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> calendarFormatter= &#123;</span><br><span class="line"></span><br><span class="line">      <span class="comment">// 传入阳历年月日获得详细的公历、农历object信息 &lt;=&gt;JSON</span></span><br><span class="line"></span><br><span class="line">      <span class="attr">solar2lunar</span>:<span class="keyword">function</span>(<span class="params">y, m, d</span>)&#123; <span class="comment">// 参数区间1900.1.31~2100.12.31</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">solar2lunar</span>(y, m, d)</span><br><span class="line"></span><br><span class="line">      &#125;,</span><br><span class="line"></span><br><span class="line">      <span class="comment">/**</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 &lt;=&gt;JSON</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@param</span> y  lunar year</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@param</span> m  lunar month</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@param</span> d  lunar day</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@param</span> isLeapMonth  lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@return</span> JSON object</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      * <span class="doctag">@eg</span>:console.log(calendar.lunar2solar(1987,9,10));</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">      */</span></span><br><span class="line"></span><br><span class="line">      <span class="attr">lunar2solar</span>: <span class="keyword">function</span> (<span class="params">y, m, d, isLeapMonth</span>) &#123; <span class="comment">// 参数区间1900.1.31~2100.12.1</span></span><br><span class="line"></span><br><span class="line">        isLeapMonth = !!isLeapMonth</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (isLeapMonth &amp;&amp; (leapMonth !== m)) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125;<span class="comment">// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (y === <span class="number">2100</span> &amp;&amp; m === <span class="number">12</span> &amp;&amp; d &gt; <span class="number">1</span> || y === <span class="number">1900</span> &amp;&amp; m === <span class="number">1</span> &amp;&amp; d &lt; <span class="number">31</span>) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125; <span class="comment">// 超出了最大极限值</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> day = <span class="title function_">monthDays</span>(y, m)</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> _day = day</span><br><span class="line"></span><br><span class="line">        <span class="comment">// bugFix 2016-9-25</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">// if month is leap, _day use leapDays method</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (isLeapMonth) &#123;</span><br><span class="line"></span><br><span class="line">          _day = <span class="title function_">leapDays</span>(y, m)</span><br><span class="line"></span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (y &lt; <span class="number">1900</span> || y &gt; <span class="number">2100</span> || d &gt; _day) &#123; <span class="keyword">return</span> -<span class="number">1</span> &#125;<span class="comment">// 参数合法性效验</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">        <span class="comment">// 计算农历的时间差</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> offset = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">1900</span>; i &lt; y; i++) &#123;</span><br><span class="line"></span><br><span class="line">          offset += <span class="title function_">lYearDays</span>(i)</span><br><span class="line"></span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> leap = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> isAdd = <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">for</span> (i = <span class="number">1</span>; i &lt; m; i++) &#123;</span><br><span class="line"></span><br><span class="line">          leap = <span class="title function_">leapMonth</span>(y)</span><br><span class="line"></span><br><span class="line">          <span class="keyword">if</span> (!isAdd) &#123; <span class="comment">// 处理闰月</span></span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span> (leap &lt;= i &amp;&amp; leap &gt; <span class="number">0</span>) &#123;</span><br><span class="line"></span><br><span class="line">              offset += <span class="title function_">leapDays</span>(y); isAdd = <span class="literal">true</span></span><br><span class="line"></span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">          offset += <span class="title function_">monthDays</span>(y, i)</span><br><span class="line"></span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 转换闰月农历 需补充该年闰月的前一个月的时差</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (isLeapMonth) &#123; offset += day &#125;</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> stmap = <span class="title class_">Date</span>.<span class="title function_">UTC</span>(<span class="number">1900</span>, <span class="number">1</span>, <span class="number">30</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>)</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> calObj = <span class="keyword">new</span> <span class="title class_">Date</span>((offset + d - <span class="number">31</span>) * <span class="number">86400000</span> + stmap)</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> cY = calObj.<span class="title function_">getUTCFullYear</span>()</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> cM = calObj.<span class="title function_">getUTCMonth</span>() + <span class="number">1</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> cD = calObj.<span class="title function_">getUTCDate</span>()</span><br><span class="line"></span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">solar2lunar</span>(cY, cM, cD)</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure><h4 id="SweetAlert-js"><a href="#SweetAlert-js" class="headerlink" title="SweetAlert.js"></a>SweetAlert.js</h4><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br><span class="line">856</span><br><span class="line">857</span><br><span class="line">858</span><br><span class="line">859</span><br><span class="line">860</span><br><span class="line">861</span><br><span class="line">862</span><br><span class="line">863</span><br><span class="line">864</span><br><span class="line">865</span><br><span class="line">866</span><br><span class="line">867</span><br><span class="line">868</span><br><span class="line">869</span><br><span class="line">870</span><br><span class="line">871</span><br><span class="line">872</span><br><span class="line">873</span><br><span class="line">874</span><br><span class="line">875</span><br><span class="line">876</span><br><span class="line">877</span><br><span class="line">878</span><br><span class="line">879</span><br><span class="line">880</span><br><span class="line">881</span><br><span class="line">882</span><br><span class="line">883</span><br><span class="line">884</span><br><span class="line">885</span><br><span class="line">886</span><br><span class="line">887</span><br><span class="line">888</span><br><span class="line">889</span><br><span class="line">890</span><br><span class="line">891</span><br><span class="line">892</span><br><span class="line">893</span><br><span class="line">894</span><br><span class="line">895</span><br><span class="line">896</span><br><span class="line">897</span><br><span class="line">898</span><br><span class="line">899</span><br><span class="line">900</span><br><span class="line">901</span><br><span class="line">902</span><br><span class="line">903</span><br><span class="line">904</span><br><span class="line">905</span><br><span class="line">906</span><br><span class="line">907</span><br><span class="line">908</span><br><span class="line">909</span><br><span class="line">910</span><br><span class="line">911</span><br><span class="line">912</span><br><span class="line">913</span><br><span class="line">914</span><br><span class="line">915</span><br><span class="line">916</span><br><span class="line">917</span><br><span class="line">918</span><br><span class="line">919</span><br><span class="line">920</span><br><span class="line">921</span><br><span class="line">922</span><br><span class="line">923</span><br><span class="line">924</span><br><span class="line">925</span><br><span class="line">926</span><br><span class="line">927</span><br><span class="line">928</span><br><span class="line">929</span><br><span class="line">930</span><br><span class="line">931</span><br><span class="line">932</span><br><span class="line">933</span><br><span class="line">934</span><br><span class="line">935</span><br><span class="line">936</span><br><span class="line">937</span><br><span class="line">938</span><br><span class="line">939</span><br><span class="line">940</span><br><span class="line">941</span><br><span class="line">942</span><br><span class="line">943</span><br><span class="line">944</span><br><span class="line">945</span><br><span class="line">946</span><br><span class="line">947</span><br><span class="line">948</span><br><span class="line">949</span><br><span class="line">950</span><br><span class="line">951</span><br><span class="line">952</span><br><span class="line">953</span><br><span class="line">954</span><br><span class="line">955</span><br><span class="line">956</span><br><span class="line">957</span><br><span class="line">958</span><br><span class="line">959</span><br><span class="line">960</span><br><span class="line">961</span><br><span class="line">962</span><br><span class="line">963</span><br><span class="line">964</span><br><span class="line">965</span><br><span class="line">966</span><br><span class="line">967</span><br><span class="line">968</span><br><span class="line">969</span><br><span class="line">970</span><br><span class="line">971</span><br><span class="line">972</span><br><span class="line">973</span><br><span class="line">974</span><br><span class="line">975</span><br><span class="line">976</span><br><span class="line">977</span><br><span class="line">978</span><br><span class="line">979</span><br><span class="line">980</span><br><span class="line">981</span><br><span class="line">982</span><br><span class="line">983</span><br><span class="line">984</span><br><span class="line">985</span><br><span class="line">986</span><br><span class="line">987</span><br><span class="line">988</span><br><span class="line">989</span><br><span class="line">990</span><br><span class="line">991</span><br><span class="line">992</span><br><span class="line">993</span><br><span class="line">994</span><br><span class="line">995</span><br><span class="line">996</span><br><span class="line">997</span><br><span class="line">998</span><br><span class="line">999</span><br><span class="line">1000</span><br><span class="line">1001</span><br><span class="line">1002</span><br><span class="line">1003</span><br><span class="line">1004</span><br><span class="line">1005</span><br><span class="line">1006</span><br><span class="line">1007</span><br><span class="line">1008</span><br><span class="line">1009</span><br><span class="line">1010</span><br><span class="line">1011</span><br><span class="line">1012</span><br><span class="line">1013</span><br><span class="line">1014</span><br><span class="line">1015</span><br><span class="line">1016</span><br><span class="line">1017</span><br><span class="line">1018</span><br><span class="line">1019</span><br><span class="line">1020</span><br><span class="line">1021</span><br><span class="line">1022</span><br><span class="line">1023</span><br><span class="line">1024</span><br><span class="line">1025</span><br><span class="line">1026</span><br><span class="line">1027</span><br><span class="line">1028</span><br><span class="line">1029</span><br><span class="line">1030</span><br><span class="line">1031</span><br><span class="line">1032</span><br><span class="line">1033</span><br><span class="line">1034</span><br><span class="line">1035</span><br><span class="line">1036</span><br><span class="line">1037</span><br><span class="line">1038</span><br><span class="line">1039</span><br><span class="line">1040</span><br><span class="line">1041</span><br><span class="line">1042</span><br><span class="line">1043</span><br><span class="line">1044</span><br><span class="line">1045</span><br><span class="line">1046</span><br><span class="line">1047</span><br><span class="line">1048</span><br><span class="line">1049</span><br><span class="line">1050</span><br><span class="line">1051</span><br><span class="line">1052</span><br><span class="line">1053</span><br><span class="line">1054</span><br><span class="line">1055</span><br><span class="line">1056</span><br><span class="line">1057</span><br><span class="line">1058</span><br><span class="line">1059</span><br><span class="line">1060</span><br><span class="line">1061</span><br><span class="line">1062</span><br><span class="line">1063</span><br><span class="line">1064</span><br><span class="line">1065</span><br><span class="line">1066</span><br><span class="line">1067</span><br><span class="line">1068</span><br><span class="line">1069</span><br><span class="line">1070</span><br><span class="line">1071</span><br><span class="line">1072</span><br><span class="line">1073</span><br><span class="line">1074</span><br><span class="line">1075</span><br><span class="line">1076</span><br><span class="line">1077</span><br><span class="line">1078</span><br><span class="line">1079</span><br><span class="line">1080</span><br><span class="line">1081</span><br><span class="line">1082</span><br><span class="line">1083</span><br><span class="line">1084</span><br><span class="line">1085</span><br><span class="line">1086</span><br><span class="line">1087</span><br><span class="line">1088</span><br><span class="line">1089</span><br><span class="line">1090</span><br><span class="line">1091</span><br><span class="line">1092</span><br><span class="line">1093</span><br><span class="line">1094</span><br><span class="line">1095</span><br><span class="line">1096</span><br><span class="line">1097</span><br><span class="line">1098</span><br><span class="line">1099</span><br><span class="line">1100</span><br><span class="line">1101</span><br><span class="line">1102</span><br><span class="line">1103</span><br><span class="line">1104</span><br><span class="line">1105</span><br><span class="line">1106</span><br><span class="line">1107</span><br><span class="line">1108</span><br><span class="line">1109</span><br><span class="line">1110</span><br><span class="line">1111</span><br><span class="line">1112</span><br><span class="line">1113</span><br><span class="line">1114</span><br><span class="line">1115</span><br><span class="line">1116</span><br><span class="line">1117</span><br><span class="line">1118</span><br><span class="line">1119</span><br><span class="line">1120</span><br><span class="line">1121</span><br><span class="line">1122</span><br><span class="line">1123</span><br><span class="line">1124</span><br><span class="line">1125</span><br><span class="line">1126</span><br><span class="line">1127</span><br><span class="line">1128</span><br><span class="line">1129</span><br><span class="line">1130</span><br><span class="line">1131</span><br><span class="line">1132</span><br><span class="line">1133</span><br><span class="line">1134</span><br><span class="line">1135</span><br><span class="line">1136</span><br><span class="line">1137</span><br><span class="line">1138</span><br><span class="line">1139</span><br><span class="line">1140</span><br><span class="line">1141</span><br><span class="line">1142</span><br><span class="line">1143</span><br><span class="line">1144</span><br><span class="line">1145</span><br><span class="line">1146</span><br><span class="line">1147</span><br><span class="line">1148</span><br><span class="line">1149</span><br><span class="line">1150</span><br><span class="line">1151</span><br><span class="line">1152</span><br><span class="line">1153</span><br><span class="line">1154</span><br><span class="line">1155</span><br><span class="line">1156</span><br><span class="line">1157</span><br><span class="line">1158</span><br><span class="line">1159</span><br><span class="line">1160</span><br><span class="line">1161</span><br><span class="line">1162</span><br><span class="line">1163</span><br><span class="line">1164</span><br><span class="line">1165</span><br><span class="line">1166</span><br><span class="line">1167</span><br><span class="line">1168</span><br><span class="line">1169</span><br><span class="line">1170</span><br><span class="line">1171</span><br><span class="line">1172</span><br><span class="line">1173</span><br><span class="line">1174</span><br><span class="line">1175</span><br><span class="line">1176</span><br><span class="line">1177</span><br><span class="line">1178</span><br><span class="line">1179</span><br><span class="line">1180</span><br><span class="line">1181</span><br><span class="line">1182</span><br><span class="line">1183</span><br><span class="line">1184</span><br><span class="line">1185</span><br><span class="line">1186</span><br><span class="line">1187</span><br><span class="line">1188</span><br><span class="line">1189</span><br><span class="line">1190</span><br><span class="line">1191</span><br><span class="line">1192</span><br><span class="line">1193</span><br><span class="line">1194</span><br><span class="line">1195</span><br><span class="line">1196</span><br><span class="line">1197</span><br><span class="line">1198</span><br><span class="line">1199</span><br><span class="line">1200</span><br><span class="line">1201</span><br><span class="line">1202</span><br><span class="line">1203</span><br><span class="line">1204</span><br><span class="line">1205</span><br><span class="line">1206</span><br><span class="line">1207</span><br><span class="line">1208</span><br><span class="line">1209</span><br><span class="line">1210</span><br><span class="line">1211</span><br><span class="line">1212</span><br><span class="line">1213</span><br><span class="line">1214</span><br><span class="line">1215</span><br><span class="line">1216</span><br><span class="line">1217</span><br><span class="line">1218</span><br><span class="line">1219</span><br><span class="line">1220</span><br><span class="line">1221</span><br><span class="line">1222</span><br><span class="line">1223</span><br><span class="line">1224</span><br><span class="line">1225</span><br><span class="line">1226</span><br><span class="line">1227</span><br><span class="line">1228</span><br><span class="line">1229</span><br><span class="line">1230</span><br><span class="line">1231</span><br><span class="line">1232</span><br><span class="line">1233</span><br><span class="line">1234</span><br><span class="line">1235</span><br><span class="line">1236</span><br><span class="line">1237</span><br><span class="line">1238</span><br><span class="line">1239</span><br><span class="line">1240</span><br><span class="line">1241</span><br><span class="line">1242</span><br><span class="line">1243</span><br><span class="line">1244</span><br><span class="line">1245</span><br><span class="line">1246</span><br><span class="line">1247</span><br><span class="line">1248</span><br><span class="line">1249</span><br><span class="line">1250</span><br><span class="line">1251</span><br><span class="line">1252</span><br><span class="line">1253</span><br><span class="line">1254</span><br><span class="line">1255</span><br><span class="line">1256</span><br><span class="line">1257</span><br><span class="line">1258</span><br><span class="line">1259</span><br><span class="line">1260</span><br><span class="line">1261</span><br><span class="line">1262</span><br><span class="line">1263</span><br><span class="line">1264</span><br><span class="line">1265</span><br><span class="line">1266</span><br><span class="line">1267</span><br><span class="line">1268</span><br><span class="line">1269</span><br><span class="line">1270</span><br><span class="line">1271</span><br><span class="line">1272</span><br><span class="line">1273</span><br><span class="line">1274</span><br><span class="line">1275</span><br><span class="line">1276</span><br><span class="line">1277</span><br><span class="line">1278</span><br><span class="line">1279</span><br><span class="line">1280</span><br><span class="line">1281</span><br><span class="line">1282</span><br><span class="line">1283</span><br><span class="line">1284</span><br><span class="line">1285</span><br><span class="line">1286</span><br><span class="line">1287</span><br><span class="line">1288</span><br><span class="line">1289</span><br><span class="line">1290</span><br><span class="line">1291</span><br><span class="line">1292</span><br><span class="line">1293</span><br><span class="line">1294</span><br><span class="line">1295</span><br><span class="line">1296</span><br><span class="line">1297</span><br><span class="line">1298</span><br><span class="line">1299</span><br><span class="line">1300</span><br><span class="line">1301</span><br><span class="line">1302</span><br><span class="line">1303</span><br><span class="line">1304</span><br><span class="line">1305</span><br><span class="line">1306</span><br><span class="line">1307</span><br><span class="line">1308</span><br><span class="line">1309</span><br><span class="line">1310</span><br><span class="line">1311</span><br><span class="line">1312</span><br><span class="line">1313</span><br><span class="line">1314</span><br><span class="line">1315</span><br><span class="line">1316</span><br><span class="line">1317</span><br><span class="line">1318</span><br><span class="line">1319</span><br><span class="line">1320</span><br><span class="line">1321</span><br><span class="line">1322</span><br><span class="line">1323</span><br><span class="line">1324</span><br><span class="line">1325</span><br><span class="line">1326</span><br><span class="line">1327</span><br><span class="line">1328</span><br><span class="line">1329</span><br><span class="line">1330</span><br><span class="line">1331</span><br><span class="line">1332</span><br><span class="line">1333</span><br><span class="line">1334</span><br><span class="line">1335</span><br><span class="line">1336</span><br><span class="line">1337</span><br><span class="line">1338</span><br><span class="line">1339</span><br><span class="line">1340</span><br><span class="line">1341</span><br><span class="line">1342</span><br><span class="line">1343</span><br><span class="line">1344</span><br><span class="line">1345</span><br><span class="line">1346</span><br><span class="line">1347</span><br><span class="line">1348</span><br><span class="line">1349</span><br><span class="line">1350</span><br><span class="line">1351</span><br><span class="line">1352</span><br><span class="line">1353</span><br><span class="line">1354</span><br><span class="line">1355</span><br><span class="line">1356</span><br><span class="line">1357</span><br><span class="line">1358</span><br><span class="line">1359</span><br><span class="line">1360</span><br><span class="line">1361</span><br><span class="line">1362</span><br><span class="line">1363</span><br><span class="line">1364</span><br><span class="line">1365</span><br><span class="line">1366</span><br><span class="line">1367</span><br><span class="line">1368</span><br><span class="line">1369</span><br><span class="line">1370</span><br><span class="line">1371</span><br><span class="line">1372</span><br><span class="line">1373</span><br><span class="line">1374</span><br><span class="line">1375</span><br><span class="line">1376</span><br><span class="line">1377</span><br><span class="line">1378</span><br><span class="line">1379</span><br><span class="line">1380</span><br><span class="line">1381</span><br><span class="line">1382</span><br><span class="line">1383</span><br><span class="line">1384</span><br><span class="line">1385</span><br><span class="line">1386</span><br><span class="line">1387</span><br><span class="line">1388</span><br><span class="line">1389</span><br><span class="line">1390</span><br><span class="line">1391</span><br><span class="line">1392</span><br><span class="line">1393</span><br><span class="line">1394</span><br><span class="line">1395</span><br><span class="line">1396</span><br><span class="line">1397</span><br><span class="line">1398</span><br><span class="line">1399</span><br><span class="line">1400</span><br><span class="line">1401</span><br><span class="line">1402</span><br><span class="line">1403</span><br><span class="line">1404</span><br><span class="line">1405</span><br><span class="line">1406</span><br><span class="line">1407</span><br><span class="line">1408</span><br><span class="line">1409</span><br><span class="line">1410</span><br><span class="line">1411</span><br><span class="line">1412</span><br><span class="line">1413</span><br><span class="line">1414</span><br><span class="line">1415</span><br><span class="line">1416</span><br><span class="line">1417</span><br><span class="line">1418</span><br><span class="line">1419</span><br><span class="line">1420</span><br><span class="line">1421</span><br><span class="line">1422</span><br><span class="line">1423</span><br><span class="line">1424</span><br><span class="line">1425</span><br><span class="line">1426</span><br><span class="line">1427</span><br><span class="line">1428</span><br><span class="line">1429</span><br><span class="line">1430</span><br><span class="line">1431</span><br><span class="line">1432</span><br><span class="line">1433</span><br><span class="line">1434</span><br><span class="line">1435</span><br><span class="line">1436</span><br><span class="line">1437</span><br><span class="line">1438</span><br><span class="line">1439</span><br><span class="line">1440</span><br><span class="line">1441</span><br><span class="line">1442</span><br><span class="line">1443</span><br><span class="line">1444</span><br><span class="line">1445</span><br><span class="line">1446</span><br><span class="line">1447</span><br><span class="line">1448</span><br><span class="line">1449</span><br><span class="line">1450</span><br><span class="line">1451</span><br><span class="line">1452</span><br><span class="line">1453</span><br><span class="line">1454</span><br><span class="line">1455</span><br><span class="line">1456</span><br><span class="line">1457</span><br><span class="line">1458</span><br><span class="line">1459</span><br><span class="line">1460</span><br><span class="line">1461</span><br><span class="line">1462</span><br><span class="line">1463</span><br><span class="line">1464</span><br><span class="line">1465</span><br><span class="line">1466</span><br><span class="line">1467</span><br><span class="line">1468</span><br><span class="line">1469</span><br><span class="line">1470</span><br><span class="line">1471</span><br><span class="line">1472</span><br><span class="line">1473</span><br><span class="line">1474</span><br><span class="line">1475</span><br><span class="line">1476</span><br><span class="line">1477</span><br><span class="line">1478</span><br><span class="line">1479</span><br><span class="line">1480</span><br><span class="line">1481</span><br><span class="line">1482</span><br><span class="line">1483</span><br><span class="line">1484</span><br><span class="line">1485</span><br><span class="line">1486</span><br><span class="line">1487</span><br><span class="line">1488</span><br><span class="line">1489</span><br><span class="line">1490</span><br><span class="line">1491</span><br><span class="line">1492</span><br><span class="line">1493</span><br><span class="line">1494</span><br><span class="line">1495</span><br><span class="line">1496</span><br><span class="line">1497</span><br><span class="line">1498</span><br><span class="line">1499</span><br><span class="line">1500</span><br><span class="line">1501</span><br><span class="line">1502</span><br><span class="line">1503</span><br><span class="line">1504</span><br><span class="line">1505</span><br><span class="line">1506</span><br><span class="line">1507</span><br><span class="line">1508</span><br><span class="line">1509</span><br><span class="line">1510</span><br><span class="line">1511</span><br><span class="line">1512</span><br><span class="line">1513</span><br><span class="line">1514</span><br><span class="line">1515</span><br><span class="line">1516</span><br><span class="line">1517</span><br><span class="line">1518</span><br><span class="line">1519</span><br><span class="line">1520</span><br><span class="line">1521</span><br><span class="line">1522</span><br><span class="line">1523</span><br><span class="line">1524</span><br><span class="line">1525</span><br><span class="line">1526</span><br><span class="line">1527</span><br><span class="line">1528</span><br><span class="line">1529</span><br><span class="line">1530</span><br><span class="line">1531</span><br><span class="line">1532</span><br><span class="line">1533</span><br><span class="line">1534</span><br><span class="line">1535</span><br><span class="line">1536</span><br><span class="line">1537</span><br><span class="line">1538</span><br><span class="line">1539</span><br><span class="line">1540</span><br><span class="line">1541</span><br><span class="line">1542</span><br><span class="line">1543</span><br><span class="line">1544</span><br><span class="line">1545</span><br><span class="line">1546</span><br><span class="line">1547</span><br><span class="line">1548</span><br><span class="line">1549</span><br><span class="line">1550</span><br><span class="line">1551</span><br><span class="line">1552</span><br><span class="line">1553</span><br><span class="line">1554</span><br><span class="line">1555</span><br><span class="line">1556</span><br><span class="line">1557</span><br><span class="line">1558</span><br><span class="line">1559</span><br><span class="line">1560</span><br><span class="line">1561</span><br><span class="line">1562</span><br><span class="line">1563</span><br><span class="line">1564</span><br><span class="line">1565</span><br><span class="line">1566</span><br><span class="line">1567</span><br><span class="line">1568</span><br><span class="line">1569</span><br><span class="line">1570</span><br><span class="line">1571</span><br><span class="line">1572</span><br><span class="line">1573</span><br><span class="line">1574</span><br><span class="line">1575</span><br><span class="line">1576</span><br><span class="line">1577</span><br><span class="line">1578</span><br><span class="line">1579</span><br><span class="line">1580</span><br><span class="line">1581</span><br><span class="line">1582</span><br><span class="line">1583</span><br><span class="line">1584</span><br><span class="line">1585</span><br><span class="line">1586</span><br><span class="line">1587</span><br><span class="line">1588</span><br><span class="line">1589</span><br><span class="line">1590</span><br><span class="line">1591</span><br><span class="line">1592</span><br><span class="line">1593</span><br><span class="line">1594</span><br><span class="line">1595</span><br><span class="line">1596</span><br><span class="line">1597</span><br><span class="line">1598</span><br><span class="line">1599</span><br><span class="line">1600</span><br><span class="line">1601</span><br><span class="line">1602</span><br><span class="line">1603</span><br><span class="line">1604</span><br><span class="line">1605</span><br><span class="line">1606</span><br><span class="line">1607</span><br><span class="line">1608</span><br><span class="line">1609</span><br><span class="line">1610</span><br><span class="line">1611</span><br><span class="line">1612</span><br><span class="line">1613</span><br><span class="line">1614</span><br><span class="line">1615</span><br><span class="line">1616</span><br><span class="line">1617</span><br><span class="line">1618</span><br><span class="line">1619</span><br><span class="line">1620</span><br><span class="line">1621</span><br><span class="line">1622</span><br><span class="line">1623</span><br><span class="line">1624</span><br><span class="line">1625</span><br><span class="line">1626</span><br><span class="line">1627</span><br><span class="line">1628</span><br><span class="line">1629</span><br><span class="line">1630</span><br><span class="line">1631</span><br><span class="line">1632</span><br><span class="line">1633</span><br><span class="line">1634</span><br><span class="line">1635</span><br><span class="line">1636</span><br><span class="line">1637</span><br><span class="line">1638</span><br><span class="line">1639</span><br><span class="line">1640</span><br><span class="line">1641</span><br><span class="line">1642</span><br><span class="line">1643</span><br><span class="line">1644</span><br><span class="line">1645</span><br><span class="line">1646</span><br><span class="line">1647</span><br><span class="line">1648</span><br><span class="line">1649</span><br><span class="line">1650</span><br><span class="line">1651</span><br><span class="line">1652</span><br><span class="line">1653</span><br><span class="line">1654</span><br><span class="line">1655</span><br><span class="line">1656</span><br><span class="line">1657</span><br><span class="line">1658</span><br><span class="line">1659</span><br><span class="line">1660</span><br><span class="line">1661</span><br><span class="line">1662</span><br><span class="line">1663</span><br><span class="line">1664</span><br><span class="line">1665</span><br><span class="line">1666</span><br><span class="line">1667</span><br><span class="line">1668</span><br><span class="line">1669</span><br><span class="line">1670</span><br><span class="line">1671</span><br><span class="line">1672</span><br><span class="line">1673</span><br><span class="line">1674</span><br><span class="line">1675</span><br><span class="line">1676</span><br><span class="line">1677</span><br><span class="line">1678</span><br><span class="line">1679</span><br><span class="line">1680</span><br><span class="line">1681</span><br><span class="line">1682</span><br><span class="line">1683</span><br><span class="line">1684</span><br><span class="line">1685</span><br><span class="line">1686</span><br><span class="line">1687</span><br><span class="line">1688</span><br><span class="line">1689</span><br><span class="line">1690</span><br><span class="line">1691</span><br><span class="line">1692</span><br><span class="line">1693</span><br><span class="line">1694</span><br><span class="line">1695</span><br><span class="line">1696</span><br><span class="line">1697</span><br><span class="line">1698</span><br><span class="line">1699</span><br><span class="line">1700</span><br><span class="line">1701</span><br><span class="line">1702</span><br><span class="line">1703</span><br><span class="line">1704</span><br><span class="line">1705</span><br><span class="line">1706</span><br><span class="line">1707</span><br><span class="line">1708</span><br><span class="line">1709</span><br><span class="line">1710</span><br><span class="line">1711</span><br><span class="line">1712</span><br><span class="line">1713</span><br><span class="line">1714</span><br><span class="line">1715</span><br><span class="line">1716</span><br><span class="line">1717</span><br><span class="line">1718</span><br><span class="line">1719</span><br><span class="line">1720</span><br><span class="line">1721</span><br><span class="line">1722</span><br><span class="line">1723</span><br><span class="line">1724</span><br><span class="line">1725</span><br><span class="line">1726</span><br><span class="line">1727</span><br><span class="line">1728</span><br><span class="line">1729</span><br><span class="line">1730</span><br><span class="line">1731</span><br><span class="line">1732</span><br><span class="line">1733</span><br><span class="line">1734</span><br><span class="line">1735</span><br><span class="line">1736</span><br><span class="line">1737</span><br><span class="line">1738</span><br><span class="line">1739</span><br><span class="line">1740</span><br><span class="line">1741</span><br><span class="line">1742</span><br><span class="line">1743</span><br><span class="line">1744</span><br><span class="line">1745</span><br><span class="line">1746</span><br><span class="line">1747</span><br><span class="line">1748</span><br><span class="line">1749</span><br><span class="line">1750</span><br><span class="line">1751</span><br><span class="line">1752</span><br><span class="line">1753</span><br><span class="line">1754</span><br><span class="line">1755</span><br><span class="line">1756</span><br><span class="line">1757</span><br><span class="line">1758</span><br><span class="line">1759</span><br><span class="line">1760</span><br><span class="line">1761</span><br><span class="line">1762</span><br><span class="line">1763</span><br><span class="line">1764</span><br><span class="line">1765</span><br><span class="line">1766</span><br><span class="line">1767</span><br><span class="line">1768</span><br><span class="line">1769</span><br><span class="line">1770</span><br><span class="line">1771</span><br><span class="line">1772</span><br><span class="line">1773</span><br><span class="line">1774</span><br><span class="line">1775</span><br><span class="line">1776</span><br><span class="line">1777</span><br><span class="line">1778</span><br><span class="line">1779</span><br><span class="line">1780</span><br><span class="line">1781</span><br><span class="line">1782</span><br><span class="line">1783</span><br><span class="line">1784</span><br><span class="line">1785</span><br><span class="line">1786</span><br><span class="line">1787</span><br><span class="line">1788</span><br><span class="line">1789</span><br><span class="line">1790</span><br><span class="line">1791</span><br><span class="line">1792</span><br><span class="line">1793</span><br><span class="line">1794</span><br><span class="line">1795</span><br><span class="line">1796</span><br><span class="line">1797</span><br><span class="line">1798</span><br><span class="line">1799</span><br><span class="line">1800</span><br><span class="line">1801</span><br><span class="line">1802</span><br><span class="line">1803</span><br><span class="line">1804</span><br><span class="line">1805</span><br><span class="line">1806</span><br><span class="line">1807</span><br><span class="line">1808</span><br><span class="line">1809</span><br><span class="line">1810</span><br><span class="line">1811</span><br><span class="line">1812</span><br><span class="line">1813</span><br><span class="line">1814</span><br><span class="line">1815</span><br><span class="line">1816</span><br><span class="line">1817</span><br><span class="line">1818</span><br><span class="line">1819</span><br><span class="line">1820</span><br><span class="line">1821</span><br><span class="line">1822</span><br><span class="line">1823</span><br><span class="line">1824</span><br><span class="line">1825</span><br><span class="line">1826</span><br><span class="line">1827</span><br><span class="line">1828</span><br><span class="line">1829</span><br><span class="line">1830</span><br><span class="line">1831</span><br><span class="line">1832</span><br><span class="line">1833</span><br><span class="line">1834</span><br><span class="line">1835</span><br><span class="line">1836</span><br><span class="line">1837</span><br><span class="line">1838</span><br><span class="line">1839</span><br><span class="line">1840</span><br><span class="line">1841</span><br><span class="line">1842</span><br><span class="line">1843</span><br><span class="line">1844</span><br><span class="line">1845</span><br><span class="line">1846</span><br><span class="line">1847</span><br><span class="line">1848</span><br><span class="line">1849</span><br><span class="line">1850</span><br><span class="line">1851</span><br><span class="line">1852</span><br><span class="line">1853</span><br><span class="line">1854</span><br><span class="line">1855</span><br><span class="line">1856</span><br><span class="line">1857</span><br><span class="line">1858</span><br><span class="line">1859</span><br><span class="line">1860</span><br><span class="line">1861</span><br><span class="line">1862</span><br><span class="line">1863</span><br><span class="line">1864</span><br><span class="line">1865</span><br><span class="line">1866</span><br><span class="line">1867</span><br><span class="line">1868</span><br><span class="line">1869</span><br><span class="line">1870</span><br><span class="line">1871</span><br><span class="line">1872</span><br><span class="line">1873</span><br><span class="line">1874</span><br><span class="line">1875</span><br><span class="line">1876</span><br><span class="line">1877</span><br><span class="line">1878</span><br><span class="line">1879</span><br><span class="line">1880</span><br><span class="line">1881</span><br><span class="line">1882</span><br><span class="line">1883</span><br><span class="line">1884</span><br><span class="line">1885</span><br><span class="line">1886</span><br><span class="line">1887</span><br><span class="line">1888</span><br><span class="line">1889</span><br><span class="line">1890</span><br><span class="line">1891</span><br><span class="line">1892</span><br><span class="line">1893</span><br><span class="line">1894</span><br><span class="line">1895</span><br><span class="line">1896</span><br><span class="line">1897</span><br><span class="line">1898</span><br><span class="line">1899</span><br><span class="line">1900</span><br><span class="line">1901</span><br><span class="line">1902</span><br><span class="line">1903</span><br><span class="line">1904</span><br><span class="line">1905</span><br><span class="line">1906</span><br><span class="line">1907</span><br><span class="line">1908</span><br><span class="line">1909</span><br><span class="line">1910</span><br><span class="line">1911</span><br><span class="line">1912</span><br><span class="line">1913</span><br><span class="line">1914</span><br><span class="line">1915</span><br><span class="line">1916</span><br><span class="line">1917</span><br><span class="line">1918</span><br><span class="line">1919</span><br><span class="line">1920</span><br><span class="line">1921</span><br><span class="line">1922</span><br><span class="line">1923</span><br><span class="line">1924</span><br><span class="line">1925</span><br><span class="line">1926</span><br><span class="line">1927</span><br><span class="line">1928</span><br><span class="line">1929</span><br><span class="line">1930</span><br><span class="line">1931</span><br><span class="line">1932</span><br><span class="line">1933</span><br><span class="line">1934</span><br><span class="line">1935</span><br><span class="line">1936</span><br><span class="line">1937</span><br><span class="line">1938</span><br><span class="line">1939</span><br><span class="line">1940</span><br><span class="line">1941</span><br><span class="line">1942</span><br><span class="line">1943</span><br><span class="line">1944</span><br><span class="line">1945</span><br><span class="line">1946</span><br><span class="line">1947</span><br><span class="line">1948</span><br><span class="line">1949</span><br><span class="line">1950</span><br><span class="line">1951</span><br><span class="line">1952</span><br><span class="line">1953</span><br><span class="line">1954</span><br><span class="line">1955</span><br><span class="line">1956</span><br><span class="line">1957</span><br><span class="line">1958</span><br><span class="line">1959</span><br><span class="line">1960</span><br><span class="line">1961</span><br><span class="line">1962</span><br><span class="line">1963</span><br><span class="line">1964</span><br><span class="line">1965</span><br><span class="line">1966</span><br><span class="line">1967</span><br><span class="line">1968</span><br><span class="line">1969</span><br><span class="line">1970</span><br><span class="line">1971</span><br><span class="line">1972</span><br><span class="line">1973</span><br><span class="line">1974</span><br><span class="line">1975</span><br><span class="line">1976</span><br><span class="line">1977</span><br><span class="line">1978</span><br><span class="line">1979</span><br><span class="line">1980</span><br><span class="line">1981</span><br><span class="line">1982</span><br><span class="line">1983</span><br><span class="line">1984</span><br><span class="line">1985</span><br><span class="line">1986</span><br><span class="line">1987</span><br><span class="line">1988</span><br><span class="line">1989</span><br><span class="line">1990</span><br><span class="line">1991</span><br><span class="line">1992</span><br><span class="line">1993</span><br><span class="line">1994</span><br><span class="line">1995</span><br><span class="line">1996</span><br><span class="line">1997</span><br><span class="line">1998</span><br><span class="line">1999</span><br><span class="line">2000</span><br><span class="line">2001</span><br><span class="line">2002</span><br><span class="line">2003</span><br><span class="line">2004</span><br><span class="line">2005</span><br><span class="line">2006</span><br><span class="line">2007</span><br><span class="line">2008</span><br><span class="line">2009</span><br><span class="line">2010</span><br><span class="line">2011</span><br><span class="line">2012</span><br><span class="line">2013</span><br><span class="line">2014</span><br><span class="line">2015</span><br><span class="line">2016</span><br><span class="line">2017</span><br><span class="line">2018</span><br><span class="line">2019</span><br><span class="line">2020</span><br><span class="line">2021</span><br><span class="line">2022</span><br><span class="line">2023</span><br><span class="line">2024</span><br><span class="line">2025</span><br><span class="line">2026</span><br><span class="line">2027</span><br><span class="line">2028</span><br><span class="line">2029</span><br><span class="line">2030</span><br><span class="line">2031</span><br><span class="line">2032</span><br><span class="line">2033</span><br><span class="line">2034</span><br><span class="line">2035</span><br><span class="line">2036</span><br><span class="line">2037</span><br><span class="line">2038</span><br><span class="line">2039</span><br><span class="line">2040</span><br><span class="line">2041</span><br><span class="line">2042</span><br><span class="line">2043</span><br><span class="line">2044</span><br><span class="line">2045</span><br><span class="line">2046</span><br><span class="line">2047</span><br><span class="line">2048</span><br><span class="line">2049</span><br><span class="line">2050</span><br><span class="line">2051</span><br><span class="line">2052</span><br><span class="line">2053</span><br><span class="line">2054</span><br><span class="line">2055</span><br><span class="line">2056</span><br><span class="line">2057</span><br><span class="line">2058</span><br><span class="line">2059</span><br><span class="line">2060</span><br><span class="line">2061</span><br><span class="line">2062</span><br><span class="line">2063</span><br><span class="line">2064</span><br><span class="line">2065</span><br><span class="line">2066</span><br><span class="line">2067</span><br><span class="line">2068</span><br><span class="line">2069</span><br><span class="line">2070</span><br><span class="line">2071</span><br><span class="line">2072</span><br><span class="line">2073</span><br><span class="line">2074</span><br><span class="line">2075</span><br><span class="line">2076</span><br><span class="line">2077</span><br><span class="line">2078</span><br><span class="line">2079</span><br><span class="line">2080</span><br><span class="line">2081</span><br><span class="line">2082</span><br><span class="line">2083</span><br><span class="line">2084</span><br><span class="line">2085</span><br><span class="line">2086</span><br><span class="line">2087</span><br><span class="line">2088</span><br><span class="line">2089</span><br><span class="line">2090</span><br><span class="line">2091</span><br><span class="line">2092</span><br><span class="line">2093</span><br><span class="line">2094</span><br><span class="line">2095</span><br><span class="line">2096</span><br><span class="line">2097</span><br><span class="line">2098</span><br><span class="line">2099</span><br><span class="line">2100</span><br><span class="line">2101</span><br><span class="line">2102</span><br><span class="line">2103</span><br><span class="line">2104</span><br><span class="line">2105</span><br><span class="line">2106</span><br><span class="line">2107</span><br><span class="line">2108</span><br><span class="line">2109</span><br><span class="line">2110</span><br><span class="line">2111</span><br><span class="line">2112</span><br><span class="line">2113</span><br><span class="line">2114</span><br><span class="line">2115</span><br><span class="line">2116</span><br><span class="line">2117</span><br><span class="line">2118</span><br><span class="line">2119</span><br><span class="line">2120</span><br><span class="line">2121</span><br><span class="line">2122</span><br><span class="line">2123</span><br><span class="line">2124</span><br><span class="line">2125</span><br><span class="line">2126</span><br><span class="line">2127</span><br><span class="line">2128</span><br><span class="line">2129</span><br><span class="line">2130</span><br><span class="line">2131</span><br><span class="line">2132</span><br><span class="line">2133</span><br><span class="line">2134</span><br><span class="line">2135</span><br><span class="line">2136</span><br><span class="line">2137</span><br><span class="line">2138</span><br><span class="line">2139</span><br><span class="line">2140</span><br><span class="line">2141</span><br><span class="line">2142</span><br><span class="line">2143</span><br><span class="line">2144</span><br><span class="line">2145</span><br><span class="line">2146</span><br><span class="line">2147</span><br><span class="line">2148</span><br><span class="line">2149</span><br><span class="line">2150</span><br><span class="line">2151</span><br><span class="line">2152</span><br><span class="line">2153</span><br><span class="line">2154</span><br><span class="line">2155</span><br><span class="line">2156</span><br><span class="line">2157</span><br><span class="line">2158</span><br><span class="line">2159</span><br><span class="line">2160</span><br><span class="line">2161</span><br><span class="line">2162</span><br><span class="line">2163</span><br><span class="line">2164</span><br><span class="line">2165</span><br><span class="line">2166</span><br><span class="line">2167</span><br><span class="line">2168</span><br><span class="line">2169</span><br><span class="line">2170</span><br><span class="line">2171</span><br><span class="line">2172</span><br><span class="line">2173</span><br><span class="line">2174</span><br><span class="line">2175</span><br><span class="line">2176</span><br><span class="line">2177</span><br><span class="line">2178</span><br><span class="line">2179</span><br><span class="line">2180</span><br><span class="line">2181</span><br><span class="line">2182</span><br><span class="line">2183</span><br><span class="line">2184</span><br><span class="line">2185</span><br><span class="line">2186</span><br><span class="line">2187</span><br><span class="line">2188</span><br><span class="line">2189</span><br><span class="line">2190</span><br><span class="line">2191</span><br><span class="line">2192</span><br><span class="line">2193</span><br><span class="line">2194</span><br><span class="line">2195</span><br><span class="line">2196</span><br><span class="line">2197</span><br><span class="line">2198</span><br><span class="line">2199</span><br><span class="line">2200</span><br><span class="line">2201</span><br><span class="line">2202</span><br><span class="line">2203</span><br><span class="line">2204</span><br><span class="line">2205</span><br><span class="line">2206</span><br><span class="line">2207</span><br><span class="line">2208</span><br><span class="line">2209</span><br><span class="line">2210</span><br><span class="line">2211</span><br><span class="line">2212</span><br><span class="line">2213</span><br><span class="line">2214</span><br><span class="line">2215</span><br><span class="line">2216</span><br><span class="line">2217</span><br><span class="line">2218</span><br><span class="line">2219</span><br><span class="line">2220</span><br><span class="line">2221</span><br><span class="line">2222</span><br><span class="line">2223</span><br><span class="line">2224</span><br><span class="line">2225</span><br><span class="line">2226</span><br><span class="line">2227</span><br><span class="line">2228</span><br><span class="line">2229</span><br><span class="line">2230</span><br><span class="line">2231</span><br><span class="line">2232</span><br><span class="line">2233</span><br><span class="line">2234</span><br><span class="line">2235</span><br><span class="line">2236</span><br><span class="line">2237</span><br><span class="line">2238</span><br><span class="line">2239</span><br><span class="line">2240</span><br><span class="line">2241</span><br><span class="line">2242</span><br><span class="line">2243</span><br><span class="line">2244</span><br><span class="line">2245</span><br><span class="line">2246</span><br><span class="line">2247</span><br><span class="line">2248</span><br><span class="line">2249</span><br><span class="line">2250</span><br><span class="line">2251</span><br><span class="line">2252</span><br><span class="line">2253</span><br><span class="line">2254</span><br><span class="line">2255</span><br><span class="line">2256</span><br><span class="line">2257</span><br><span class="line">2258</span><br><span class="line">2259</span><br><span class="line">2260</span><br><span class="line">2261</span><br><span class="line">2262</span><br><span class="line">2263</span><br><span class="line">2264</span><br><span class="line">2265</span><br><span class="line">2266</span><br><span class="line">2267</span><br><span class="line">2268</span><br><span class="line">2269</span><br><span class="line">2270</span><br><span class="line">2271</span><br><span class="line">2272</span><br><span class="line">2273</span><br><span class="line">2274</span><br><span class="line">2275</span><br><span class="line">2276</span><br><span class="line">2277</span><br><span class="line">2278</span><br><span class="line">2279</span><br><span class="line">2280</span><br><span class="line">2281</span><br><span class="line">2282</span><br><span class="line">2283</span><br><span class="line">2284</span><br><span class="line">2285</span><br><span class="line">2286</span><br><span class="line">2287</span><br><span class="line">2288</span><br><span class="line">2289</span><br><span class="line">2290</span><br><span class="line">2291</span><br><span class="line">2292</span><br><span class="line">2293</span><br><span class="line">2294</span><br><span class="line">2295</span><br><span class="line">2296</span><br><span class="line">2297</span><br><span class="line">2298</span><br><span class="line">2299</span><br><span class="line">2300</span><br><span class="line">2301</span><br><span class="line">2302</span><br><span class="line">2303</span><br><span class="line">2304</span><br><span class="line">2305</span><br><span class="line">2306</span><br><span class="line">2307</span><br><span class="line">2308</span><br><span class="line">2309</span><br><span class="line">2310</span><br><span class="line">2311</span><br><span class="line">2312</span><br><span class="line">2313</span><br><span class="line">2314</span><br><span class="line">2315</span><br><span class="line">2316</span><br><span class="line">2317</span><br><span class="line">2318</span><br><span class="line">2319</span><br><span class="line">2320</span><br><span class="line">2321</span><br><span class="line">2322</span><br><span class="line">2323</span><br><span class="line">2324</span><br><span class="line">2325</span><br><span class="line">2326</span><br><span class="line">2327</span><br><span class="line">2328</span><br><span class="line">2329</span><br><span class="line">2330</span><br><span class="line">2331</span><br><span class="line">2332</span><br><span class="line">2333</span><br><span class="line">2334</span><br><span class="line">2335</span><br><span class="line">2336</span><br><span class="line">2337</span><br><span class="line">2338</span><br><span class="line">2339</span><br><span class="line">2340</span><br><span class="line">2341</span><br><span class="line">2342</span><br><span class="line">2343</span><br><span class="line">2344</span><br><span class="line">2345</span><br><span class="line">2346</span><br><span class="line">2347</span><br><span class="line">2348</span><br><span class="line">2349</span><br><span class="line">2350</span><br><span class="line">2351</span><br><span class="line">2352</span><br><span class="line">2353</span><br><span class="line">2354</span><br><span class="line">2355</span><br><span class="line">2356</span><br><span class="line">2357</span><br><span class="line">2358</span><br><span class="line">2359</span><br><span class="line">2360</span><br><span class="line">2361</span><br><span class="line">2362</span><br><span class="line">2363</span><br><span class="line">2364</span><br><span class="line">2365</span><br><span class="line">2366</span><br><span class="line">2367</span><br><span class="line">2368</span><br><span class="line">2369</span><br><span class="line">2370</span><br><span class="line">2371</span><br><span class="line">2372</span><br><span class="line">2373</span><br><span class="line">2374</span><br><span class="line">2375</span><br><span class="line">2376</span><br><span class="line">2377</span><br><span class="line">2378</span><br><span class="line">2379</span><br><span class="line">2380</span><br><span class="line">2381</span><br><span class="line">2382</span><br><span class="line">2383</span><br><span class="line">2384</span><br><span class="line">2385</span><br><span class="line">2386</span><br><span class="line">2387</span><br><span class="line">2388</span><br><span class="line">2389</span><br><span class="line">2390</span><br><span class="line">2391</span><br><span class="line">2392</span><br><span class="line">2393</span><br><span class="line">2394</span><br><span class="line">2395</span><br><span class="line">2396</span><br><span class="line">2397</span><br><span class="line">2398</span><br><span class="line">2399</span><br><span class="line">2400</span><br><span class="line">2401</span><br><span class="line">2402</span><br><span class="line">2403</span><br><span class="line">2404</span><br><span class="line">2405</span><br><span class="line">2406</span><br><span class="line">2407</span><br><span class="line">2408</span><br><span class="line">2409</span><br><span class="line">2410</span><br><span class="line">2411</span><br><span class="line">2412</span><br><span class="line">2413</span><br><span class="line">2414</span><br><span class="line">2415</span><br><span class="line">2416</span><br><span class="line">2417</span><br><span class="line">2418</span><br><span class="line">2419</span><br><span class="line">2420</span><br><span class="line">2421</span><br><span class="line">2422</span><br><span class="line">2423</span><br><span class="line">2424</span><br><span class="line">2425</span><br><span class="line">2426</span><br><span class="line">2427</span><br><span class="line">2428</span><br><span class="line">2429</span><br><span class="line">2430</span><br><span class="line">2431</span><br><span class="line">2432</span><br><span class="line">2433</span><br><span class="line">2434</span><br><span class="line">2435</span><br><span class="line">2436</span><br><span class="line">2437</span><br><span class="line">2438</span><br><span class="line">2439</span><br><span class="line">2440</span><br><span class="line">2441</span><br><span class="line">2442</span><br><span class="line">2443</span><br><span class="line">2444</span><br><span class="line">2445</span><br><span class="line">2446</span><br><span class="line">2447</span><br><span class="line">2448</span><br><span class="line">2449</span><br><span class="line">2450</span><br><span class="line">2451</span><br><span class="line">2452</span><br><span class="line">2453</span><br><span class="line">2454</span><br><span class="line">2455</span><br><span class="line">2456</span><br><span class="line">2457</span><br><span class="line">2458</span><br><span class="line">2459</span><br><span class="line">2460</span><br><span class="line">2461</span><br><span class="line">2462</span><br><span class="line">2463</span><br><span class="line">2464</span><br><span class="line">2465</span><br><span class="line">2466</span><br><span class="line">2467</span><br><span class="line">2468</span><br><span class="line">2469</span><br><span class="line">2470</span><br><span class="line">2471</span><br><span class="line">2472</span><br><span class="line">2473</span><br><span class="line">2474</span><br><span class="line">2475</span><br><span class="line">2476</span><br><span class="line">2477</span><br><span class="line">2478</span><br><span class="line">2479</span><br><span class="line">2480</span><br><span class="line">2481</span><br><span class="line">2482</span><br><span class="line">2483</span><br><span class="line">2484</span><br><span class="line">2485</span><br><span class="line">2486</span><br><span class="line">2487</span><br><span class="line">2488</span><br><span class="line">2489</span><br><span class="line">2490</span><br><span class="line">2491</span><br><span class="line">2492</span><br><span class="line">2493</span><br><span class="line">2494</span><br><span class="line">2495</span><br><span class="line">2496</span><br><span class="line">2497</span><br><span class="line">2498</span><br><span class="line">2499</span><br><span class="line">2500</span><br><span class="line">2501</span><br><span class="line">2502</span><br><span class="line">2503</span><br><span class="line">2504</span><br><span class="line">2505</span><br><span class="line">2506</span><br><span class="line">2507</span><br><span class="line">2508</span><br><span class="line">2509</span><br><span class="line">2510</span><br><span class="line">2511</span><br><span class="line">2512</span><br><span class="line">2513</span><br><span class="line">2514</span><br><span class="line">2515</span><br><span class="line">2516</span><br><span class="line">2517</span><br><span class="line">2518</span><br><span class="line">2519</span><br><span class="line">2520</span><br><span class="line">2521</span><br><span class="line">2522</span><br><span class="line">2523</span><br><span class="line">2524</span><br><span class="line">2525</span><br><span class="line">2526</span><br><span class="line">2527</span><br><span class="line">2528</span><br><span class="line">2529</span><br><span class="line">2530</span><br><span class="line">2531</span><br><span class="line">2532</span><br><span class="line">2533</span><br><span class="line">2534</span><br><span class="line">2535</span><br><span class="line">2536</span><br><span class="line">2537</span><br><span class="line">2538</span><br><span class="line">2539</span><br><span class="line">2540</span><br><span class="line">2541</span><br><span class="line">2542</span><br><span class="line">2543</span><br><span class="line">2544</span><br><span class="line">2545</span><br><span class="line">2546</span><br><span class="line">2547</span><br><span class="line">2548</span><br><span class="line">2549</span><br><span class="line">2550</span><br><span class="line">2551</span><br><span class="line">2552</span><br><span class="line">2553</span><br><span class="line">2554</span><br><span class="line">2555</span><br><span class="line">2556</span><br><span class="line">2557</span><br><span class="line">2558</span><br><span class="line">2559</span><br><span class="line">2560</span><br><span class="line">2561</span><br><span class="line">2562</span><br><span class="line">2563</span><br><span class="line">2564</span><br><span class="line">2565</span><br><span class="line">2566</span><br><span class="line">2567</span><br><span class="line">2568</span><br><span class="line">2569</span><br><span class="line">2570</span><br><span class="line">2571</span><br><span class="line">2572</span><br><span class="line">2573</span><br><span class="line">2574</span><br><span class="line">2575</span><br><span class="line">2576</span><br><span class="line">2577</span><br><span class="line">2578</span><br><span class="line">2579</span><br><span class="line">2580</span><br><span class="line">2581</span><br><span class="line">2582</span><br><span class="line">2583</span><br><span class="line">2584</span><br><span class="line">2585</span><br><span class="line">2586</span><br><span class="line">2587</span><br><span class="line">2588</span><br><span class="line">2589</span><br><span class="line">2590</span><br><span class="line">2591</span><br><span class="line">2592</span><br><span class="line">2593</span><br><span class="line">2594</span><br><span class="line">2595</span><br><span class="line">2596</span><br><span class="line">2597</span><br><span class="line">2598</span><br><span class="line">2599</span><br><span class="line">2600</span><br><span class="line">2601</span><br><span class="line">2602</span><br><span class="line">2603</span><br><span class="line">2604</span><br><span class="line">2605</span><br><span class="line">2606</span><br><span class="line">2607</span><br><span class="line">2608</span><br><span class="line">2609</span><br><span class="line">2610</span><br><span class="line">2611</span><br><span class="line">2612</span><br><span class="line">2613</span><br><span class="line">2614</span><br><span class="line">2615</span><br><span class="line">2616</span><br><span class="line">2617</span><br><span class="line">2618</span><br><span class="line">2619</span><br><span class="line">2620</span><br><span class="line">2621</span><br><span class="line">2622</span><br><span class="line">2623</span><br><span class="line">2624</span><br><span class="line">2625</span><br><span class="line">2626</span><br><span class="line">2627</span><br><span class="line">2628</span><br><span class="line">2629</span><br><span class="line">2630</span><br><span class="line">2631</span><br><span class="line">2632</span><br><span class="line">2633</span><br><span class="line">2634</span><br><span class="line">2635</span><br><span class="line">2636</span><br><span class="line">2637</span><br><span class="line">2638</span><br><span class="line">2639</span><br><span class="line">2640</span><br><span class="line">2641</span><br><span class="line">2642</span><br><span class="line">2643</span><br><span class="line">2644</span><br><span class="line">2645</span><br><span class="line">2646</span><br><span class="line">2647</span><br><span class="line">2648</span><br><span class="line">2649</span><br><span class="line">2650</span><br><span class="line">2651</span><br><span class="line">2652</span><br><span class="line">2653</span><br><span class="line">2654</span><br><span class="line">2655</span><br><span class="line">2656</span><br><span class="line">2657</span><br><span class="line">2658</span><br><span class="line">2659</span><br><span class="line">2660</span><br><span class="line">2661</span><br><span class="line">2662</span><br><span class="line">2663</span><br><span class="line">2664</span><br><span class="line">2665</span><br><span class="line">2666</span><br><span class="line">2667</span><br><span class="line">2668</span><br><span class="line">2669</span><br><span class="line">2670</span><br><span class="line">2671</span><br><span class="line">2672</span><br><span class="line">2673</span><br><span class="line">2674</span><br><span class="line">2675</span><br><span class="line">2676</span><br><span class="line">2677</span><br><span class="line">2678</span><br><span class="line">2679</span><br><span class="line">2680</span><br><span class="line">2681</span><br><span class="line">2682</span><br><span class="line">2683</span><br><span class="line">2684</span><br><span class="line">2685</span><br><span class="line">2686</span><br><span class="line">2687</span><br><span class="line">2688</span><br><span class="line">2689</span><br><span class="line">2690</span><br><span class="line">2691</span><br><span class="line">2692</span><br><span class="line">2693</span><br><span class="line">2694</span><br><span class="line">2695</span><br><span class="line">2696</span><br><span class="line">2697</span><br><span class="line">2698</span><br><span class="line">2699</span><br><span class="line">2700</span><br><span class="line">2701</span><br><span class="line">2702</span><br><span class="line">2703</span><br><span class="line">2704</span><br><span class="line">2705</span><br><span class="line">2706</span><br><span class="line">2707</span><br><span class="line">2708</span><br><span class="line">2709</span><br><span class="line">2710</span><br><span class="line">2711</span><br><span class="line">2712</span><br><span class="line">2713</span><br><span class="line">2714</span><br><span class="line">2715</span><br><span class="line">2716</span><br><span class="line">2717</span><br><span class="line">2718</span><br><span class="line">2719</span><br><span class="line">2720</span><br><span class="line">2721</span><br><span class="line">2722</span><br><span class="line">2723</span><br><span class="line">2724</span><br><span class="line">2725</span><br><span class="line">2726</span><br><span class="line">2727</span><br><span class="line">2728</span><br><span class="line">2729</span><br><span class="line">2730</span><br><span class="line">2731</span><br><span class="line">2732</span><br><span class="line">2733</span><br><span class="line">2734</span><br><span class="line">2735</span><br><span class="line">2736</span><br><span class="line">2737</span><br><span class="line">2738</span><br><span class="line">2739</span><br><span class="line">2740</span><br><span class="line">2741</span><br><span class="line">2742</span><br><span class="line">2743</span><br><span class="line">2744</span><br><span class="line">2745</span><br><span class="line">2746</span><br><span class="line">2747</span><br><span class="line">2748</span><br><span class="line">2749</span><br><span class="line">2750</span><br><span class="line">2751</span><br><span class="line">2752</span><br><span class="line">2753</span><br><span class="line">2754</span><br><span class="line">2755</span><br><span class="line">2756</span><br><span class="line">2757</span><br><span class="line">2758</span><br><span class="line">2759</span><br><span class="line">2760</span><br><span class="line">2761</span><br><span class="line">2762</span><br><span class="line">2763</span><br><span class="line">2764</span><br><span class="line">2765</span><br><span class="line">2766</span><br><span class="line">2767</span><br><span class="line">2768</span><br><span class="line">2769</span><br><span class="line">2770</span><br><span class="line">2771</span><br><span class="line">2772</span><br><span class="line">2773</span><br><span class="line">2774</span><br><span class="line">2775</span><br><span class="line">2776</span><br><span class="line">2777</span><br><span class="line">2778</span><br><span class="line">2779</span><br><span class="line">2780</span><br><span class="line">2781</span><br><span class="line">2782</span><br><span class="line">2783</span><br><span class="line">2784</span><br><span class="line">2785</span><br><span class="line">2786</span><br><span class="line">2787</span><br><span class="line">2788</span><br><span class="line">2789</span><br><span class="line">2790</span><br><span class="line">2791</span><br><span class="line">2792</span><br><span class="line">2793</span><br><span class="line">2794</span><br><span class="line">2795</span><br><span class="line">2796</span><br><span class="line">2797</span><br><span class="line">2798</span><br><span class="line">2799</span><br><span class="line">2800</span><br><span class="line">2801</span><br><span class="line">2802</span><br><span class="line">2803</span><br><span class="line">2804</span><br><span class="line">2805</span><br><span class="line">2806</span><br><span class="line">2807</span><br><span class="line">2808</span><br><span class="line">2809</span><br><span class="line">2810</span><br><span class="line">2811</span><br><span class="line">2812</span><br><span class="line">2813</span><br><span class="line">2814</span><br><span class="line">2815</span><br><span class="line">2816</span><br><span class="line">2817</span><br><span class="line">2818</span><br><span class="line">2819</span><br><span class="line">2820</span><br><span class="line">2821</span><br><span class="line">2822</span><br><span class="line">2823</span><br><span class="line">2824</span><br><span class="line">2825</span><br><span class="line">2826</span><br><span class="line">2827</span><br><span class="line">2828</span><br><span class="line">2829</span><br><span class="line">2830</span><br><span class="line">2831</span><br><span class="line">2832</span><br><span class="line">2833</span><br><span class="line">2834</span><br><span class="line">2835</span><br><span class="line">2836</span><br><span class="line">2837</span><br><span class="line">2838</span><br><span class="line">2839</span><br><span class="line">2840</span><br><span class="line">2841</span><br><span class="line">2842</span><br><span class="line">2843</span><br><span class="line">2844</span><br><span class="line">2845</span><br><span class="line">2846</span><br><span class="line">2847</span><br><span class="line">2848</span><br><span class="line">2849</span><br><span class="line">2850</span><br><span class="line">2851</span><br><span class="line">2852</span><br><span class="line">2853</span><br><span class="line">2854</span><br><span class="line">2855</span><br><span class="line">2856</span><br><span class="line">2857</span><br><span class="line">2858</span><br><span class="line">2859</span><br><span class="line">2860</span><br><span class="line">2861</span><br><span class="line">2862</span><br><span class="line">2863</span><br><span class="line">2864</span><br><span class="line">2865</span><br><span class="line">2866</span><br><span class="line">2867</span><br><span class="line">2868</span><br><span class="line">2869</span><br><span class="line">2870</span><br><span class="line">2871</span><br><span class="line">2872</span><br><span class="line">2873</span><br><span class="line">2874</span><br><span class="line">2875</span><br><span class="line">2876</span><br><span class="line">2877</span><br><span class="line">2878</span><br><span class="line">2879</span><br><span class="line">2880</span><br><span class="line">2881</span><br><span class="line">2882</span><br><span class="line">2883</span><br><span class="line">2884</span><br><span class="line">2885</span><br><span class="line">2886</span><br><span class="line">2887</span><br><span class="line">2888</span><br><span class="line">2889</span><br><span class="line">2890</span><br><span class="line">2891</span><br><span class="line">2892</span><br><span class="line">2893</span><br><span class="line">2894</span><br><span class="line">2895</span><br><span class="line">2896</span><br><span class="line">2897</span><br><span class="line">2898</span><br><span class="line">2899</span><br><span class="line">2900</span><br><span class="line">2901</span><br><span class="line">2902</span><br><span class="line">2903</span><br><span class="line">2904</span><br><span class="line">2905</span><br><span class="line">2906</span><br><span class="line">2907</span><br><span class="line">2908</span><br><span class="line">2909</span><br><span class="line">2910</span><br><span class="line">2911</span><br><span class="line">2912</span><br><span class="line">2913</span><br><span class="line">2914</span><br><span class="line">2915</span><br><span class="line">2916</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*!</span></span><br><span class="line"><span class="comment">* sweetalert2 v8.19.0</span></span><br><span class="line"><span class="comment">* Released under the MIT License.</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line">(<span class="keyword">function</span> (<span class="params"><span class="variable language_">global</span>, factory</span>) &#123;</span><br><span class="line">    <span class="keyword">typeof</span> <span class="built_in">exports</span> === <span class="string">&#x27;object&#x27;</span> &amp;&amp; <span class="keyword">typeof</span> <span class="variable language_">module</span> !== <span class="string">&#x27;undefined&#x27;</span> ? <span class="variable language_">module</span>.<span class="property">exports</span> = <span class="title function_">factory</span>() :</span><br><span class="line">    <span class="keyword">typeof</span> define === <span class="string">&#x27;function&#x27;</span> &amp;&amp; define.<span class="property">amd</span> ? <span class="title function_">define</span>(factory) :</span><br><span class="line">    (<span class="variable language_">global</span>.<span class="property">Sweetalert2</span> = <span class="title function_">factory</span>());</span><br><span class="line">&#125;(<span class="variable language_">this</span>, (<span class="keyword">function</span> (<span class="params"></span>) &#123; <span class="string">&#x27;use strict&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_typeof</span>(<span class="params">obj</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Symbol</span> === <span class="string">&quot;function&quot;</span> &amp;&amp; <span class="keyword">typeof</span> <span class="title class_">Symbol</span>.<span class="property">iterator</span> === <span class="string">&quot;symbol&quot;</span>) &#123;</span><br><span class="line">    _typeof = <span class="keyword">function</span> (<span class="params">obj</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="keyword">typeof</span> obj;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    _typeof = <span class="keyword">function</span> (<span class="params">obj</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> obj &amp;&amp; <span class="keyword">typeof</span> <span class="title class_">Symbol</span> === <span class="string">&quot;function&quot;</span> &amp;&amp; obj.<span class="property">constructor</span> === <span class="title class_">Symbol</span> &amp;&amp; obj !== <span class="title class_">Symbol</span>.<span class="property"><span class="keyword">prototype</span></span> ? <span class="string">&quot;symbol&quot;</span> : <span class="keyword">typeof</span> obj;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_typeof</span>(obj);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_classCallCheck</span>(<span class="params">instance, Constructor</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!(instance <span class="keyword">instanceof</span> <span class="title class_">Constructor</span>)) &#123;</span><br><span class="line">    <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">TypeError</span>(<span class="string">&quot;Cannot call a class as a function&quot;</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_defineProperties</span>(<span class="params">target, props</span>) &#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; props.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">var</span> descriptor = props[i];</span><br><span class="line">    descriptor.<span class="property">enumerable</span> = descriptor.<span class="property">enumerable</span> || <span class="literal">false</span>;</span><br><span class="line">    descriptor.<span class="property">configurable</span> = <span class="literal">true</span>;</span><br><span class="line">    <span class="keyword">if</span> (<span class="string">&quot;value&quot;</span> <span class="keyword">in</span> descriptor) descriptor.<span class="property">writable</span> = <span class="literal">true</span>;</span><br><span class="line">    <span class="title class_">Object</span>.<span class="title function_">defineProperty</span>(target, descriptor.<span class="property">key</span>, descriptor);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_createClass</span>(<span class="params">Constructor, protoProps, staticProps</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (protoProps) <span class="title function_">_defineProperties</span>(<span class="title class_">Constructor</span>.<span class="property"><span class="keyword">prototype</span></span>, protoProps);</span><br><span class="line">  <span class="keyword">if</span> (staticProps) <span class="title function_">_defineProperties</span>(<span class="title class_">Constructor</span>, staticProps);</span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">Constructor</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_extends</span>(<span class="params"></span>) &#123;</span><br><span class="line">  _extends = <span class="title class_">Object</span>.<span class="property">assign</span> || <span class="keyword">function</span> (<span class="params">target</span>) &#123;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">1</span>; i &lt; <span class="variable language_">arguments</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line">      <span class="keyword">var</span> source = <span class="variable language_">arguments</span>[i];</span><br><span class="line"></span><br><span class="line">      <span class="keyword">for</span> (<span class="keyword">var</span> key <span class="keyword">in</span> source) &#123;</span><br><span class="line">        <span class="keyword">if</span> (<span class="title class_">Object</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">hasOwnProperty</span>.<span class="title function_">call</span>(source, key)) &#123;</span><br><span class="line">          target[key] = source[key];</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> target;</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> _extends.<span class="title function_">apply</span>(<span class="variable language_">this</span>, <span class="variable language_">arguments</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_inherits</span>(<span class="params">subClass, superClass</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> superClass !== <span class="string">&quot;function&quot;</span> &amp;&amp; superClass !== <span class="literal">null</span>) &#123;</span><br><span class="line">    <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">TypeError</span>(<span class="string">&quot;Super expression must either be null or a function&quot;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  subClass.<span class="property"><span class="keyword">prototype</span></span> = <span class="title class_">Object</span>.<span class="title function_">create</span>(superClass &amp;&amp; superClass.<span class="property"><span class="keyword">prototype</span></span>, &#123;</span><br><span class="line">    <span class="attr">constructor</span>: &#123;</span><br><span class="line">      <span class="attr">value</span>: subClass,</span><br><span class="line">      <span class="attr">writable</span>: <span class="literal">true</span>,</span><br><span class="line">      <span class="attr">configurable</span>: <span class="literal">true</span></span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">if</span> (superClass) <span class="title function_">_setPrototypeOf</span>(subClass, superClass);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_getPrototypeOf</span>(<span class="params">o</span>) &#123;</span><br><span class="line">  _getPrototypeOf = <span class="title class_">Object</span>.<span class="property">setPrototypeOf</span> ? <span class="title class_">Object</span>.<span class="property">getPrototypeOf</span> : <span class="keyword">function</span> <span class="title function_">_getPrototypeOf</span>(<span class="params">o</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> o.<span class="property">__proto__</span> || <span class="title class_">Object</span>.<span class="title function_">getPrototypeOf</span>(o);</span><br><span class="line">  &#125;;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_getPrototypeOf</span>(o);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_setPrototypeOf</span>(<span class="params">o, p</span>) &#123;</span><br><span class="line">  _setPrototypeOf = <span class="title class_">Object</span>.<span class="property">setPrototypeOf</span> || <span class="keyword">function</span> <span class="title function_">_setPrototypeOf</span>(<span class="params">o, p</span>) &#123;</span><br><span class="line">    o.<span class="property">__proto__</span> = p;</span><br><span class="line">    <span class="keyword">return</span> o;</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_setPrototypeOf</span>(o, p);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">isNativeReflectConstruct</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Reflect</span> === <span class="string">&quot;undefined&quot;</span> || !<span class="title class_">Reflect</span>.<span class="property">construct</span>) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title class_">Reflect</span>.<span class="property">construct</span>.<span class="property">sham</span>) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Proxy</span> === <span class="string">&quot;function&quot;</span>) <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">try</span> &#123;</span><br><span class="line">    <span class="title class_">Date</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">toString</span>.<span class="title function_">call</span>(<span class="title class_">Reflect</span>.<span class="title function_">construct</span>(<span class="title class_">Date</span>, [], <span class="keyword">function</span> (<span class="params"></span>) &#123;&#125;));</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line">  &#125; <span class="keyword">catch</span> (e) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_construct</span>(<span class="params">Parent, args, Class</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isNativeReflectConstruct</span>()) &#123;</span><br><span class="line">    _construct = <span class="title class_">Reflect</span>.<span class="property">construct</span>;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    _construct = <span class="keyword">function</span> <span class="title function_">_construct</span>(<span class="params">Parent, args, Class</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> a = [<span class="literal">null</span>];</span><br><span class="line">      a.<span class="property">push</span>.<span class="title function_">apply</span>(a, args);</span><br><span class="line">      <span class="keyword">var</span> <span class="title class_">Constructor</span> = <span class="title class_">Function</span>.<span class="property">bind</span>.<span class="title function_">apply</span>(<span class="title class_">Parent</span>, a);</span><br><span class="line">      <span class="keyword">var</span> instance = <span class="keyword">new</span> <span class="title class_">Constructor</span>();</span><br><span class="line">      <span class="keyword">if</span> (<span class="title class_">Class</span>) <span class="title function_">_setPrototypeOf</span>(instance, <span class="title class_">Class</span>.<span class="property"><span class="keyword">prototype</span></span>);</span><br><span class="line">      <span class="keyword">return</span> instance;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> _construct.<span class="title function_">apply</span>(<span class="literal">null</span>, <span class="variable language_">arguments</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_assertThisInitialized</span>(<span class="params">self</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (self === <span class="keyword">void</span> <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">ReferenceError</span>(<span class="string">&quot;this hasn&#x27;t been initialised - super() hasn&#x27;t been called&quot;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> self;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_possibleConstructorReturn</span>(<span class="params">self, call</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (call &amp;&amp; (<span class="keyword">typeof</span> call === <span class="string">&quot;object&quot;</span> || <span class="keyword">typeof</span> call === <span class="string">&quot;function&quot;</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span> call;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_assertThisInitialized</span>(self);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_superPropBase</span>(<span class="params">object, property</span>) &#123;</span><br><span class="line">  <span class="keyword">while</span> (!<span class="title class_">Object</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">hasOwnProperty</span>.<span class="title function_">call</span>(object, property)) &#123;</span><br><span class="line">    object = <span class="title function_">_getPrototypeOf</span>(object);</span><br><span class="line">    <span class="keyword">if</span> (object === <span class="literal">null</span>) <span class="keyword">break</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> object;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_get</span>(<span class="params">target, property, receiver</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Reflect</span> !== <span class="string">&quot;undefined&quot;</span> &amp;&amp; <span class="title class_">Reflect</span>.<span class="property">get</span>) &#123;</span><br><span class="line">    _get = <span class="title class_">Reflect</span>.<span class="property">get</span>;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    _get = <span class="keyword">function</span> <span class="title function_">_get</span>(<span class="params">target, property, receiver</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> base = <span class="title function_">_superPropBase</span>(target, property);</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (!base) <span class="keyword">return</span>;</span><br><span class="line">      <span class="keyword">var</span> desc = <span class="title class_">Object</span>.<span class="title function_">getOwnPropertyDescriptor</span>(base, property);</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (desc.<span class="property">get</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> desc.<span class="property">get</span>.<span class="title function_">call</span>(receiver);</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> desc.<span class="property">value</span>;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_get</span>(target, property, receiver || target);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> consolePrefix = <span class="string">&#x27;SweetAlert2:&#x27;</span>;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Filter the unique values into a new array</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">arr</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> uniqueArray = <span class="keyword">function</span> <span class="title function_">uniqueArray</span>(<span class="params">arr</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> result = [];</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; arr.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">if</span> (result.<span class="title function_">indexOf</span>(arr[i]) === -<span class="number">1</span>) &#123;</span><br><span class="line">      result.<span class="title function_">push</span>(arr[i]);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> result;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Returns the array ob object values (Object.values isn&#x27;t supported in IE11)</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">obj</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> objectValues = <span class="keyword">function</span> <span class="title function_">objectValues</span>(<span class="params">obj</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">Object</span>.<span class="title function_">keys</span>(obj).<span class="title function_">map</span>(<span class="keyword">function</span> (<span class="params">key</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> obj[key];</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Convert NodeList to Array</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">nodeList</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> toArray = <span class="keyword">function</span> <span class="title function_">toArray</span>(<span class="params">nodeList</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">Array</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">slice</span>.<span class="title function_">call</span>(nodeList);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Standardise console warnings</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">message</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> warn = <span class="keyword">function</span> <span class="title function_">warn</span>(<span class="params">message</span>) &#123;</span><br><span class="line">  <span class="variable language_">console</span>.<span class="title function_">warn</span>(<span class="string">&quot;&quot;</span>.<span class="title function_">concat</span>(consolePrefix, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(message));</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Standardise console errors</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">message</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> error = <span class="keyword">function</span> <span class="title function_">error</span>(<span class="params">message</span>) &#123;</span><br><span class="line">  <span class="variable language_">console</span>.<span class="title function_">error</span>(<span class="string">&quot;&quot;</span>.<span class="title function_">concat</span>(consolePrefix, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(message));</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Private global state for `warnOnce`</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@type</span> &#123;<span class="type">Array</span>&#125;</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@private</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> previousWarnOnceMessages = [];</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Show a console warning, but only if it hasn&#x27;t already been shown</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">message</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> warnOnce = <span class="keyword">function</span> <span class="title function_">warnOnce</span>(<span class="params">message</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!(previousWarnOnceMessages.<span class="title function_">indexOf</span>(message) !== -<span class="number">1</span>)) &#123;</span><br><span class="line">    previousWarnOnceMessages.<span class="title function_">push</span>(message);</span><br><span class="line">    <span class="title function_">warn</span>(message);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Show a one-time console warning about deprecated params/methods</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> warnAboutDepreation = <span class="keyword">function</span> <span class="title function_">warnAboutDepreation</span>(<span class="params">deprecatedParam, useInstead</span>) &#123;</span><br><span class="line">  <span class="title function_">warnOnce</span>(<span class="string">&quot;\&quot;&quot;</span>.<span class="title function_">concat</span>(deprecatedParam, <span class="string">&quot;\&quot; is deprecated and will be removed in the next major release. Please use \&quot;&quot;</span>).<span class="title function_">concat</span>(useInstead, <span class="string">&quot;\&quot; instead.&quot;</span>));</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * If `arg` is a function, call it (with no arguments or context) and return the result.</span></span><br><span class="line"><span class="comment"> * Otherwise, just pass the value through</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">arg</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> callIfFunction = <span class="keyword">function</span> <span class="title function_">callIfFunction</span>(<span class="params">arg</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">typeof</span> arg === <span class="string">&#x27;function&#x27;</span> ? <span class="title function_">arg</span>() : arg;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> isPromise = <span class="keyword">function</span> <span class="title function_">isPromise</span>(<span class="params">arg</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> arg &amp;&amp; <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(arg) === arg;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="title class_">DismissReason</span> = <span class="title class_">Object</span>.<span class="title function_">freeze</span>(&#123;</span><br><span class="line">  <span class="attr">cancel</span>: <span class="string">&#x27;cancel&#x27;</span>,</span><br><span class="line">  <span class="attr">backdrop</span>: <span class="string">&#x27;backdrop&#x27;</span>,</span><br><span class="line">  <span class="attr">close</span>: <span class="string">&#x27;close&#x27;</span>,</span><br><span class="line">  <span class="attr">esc</span>: <span class="string">&#x27;esc&#x27;</span>,</span><br><span class="line">  <span class="attr">timer</span>: <span class="string">&#x27;timer&#x27;</span></span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> argsToParams = <span class="keyword">function</span> <span class="title function_">argsToParams</span>(<span class="params">args</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> params = &#123;&#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">switch</span> (<span class="title function_">_typeof</span>(args[<span class="number">0</span>])) &#123;</span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;object&#x27;</span>:</span><br><span class="line">      <span class="title function_">_extends</span>(params, args[<span class="number">0</span>]);</span><br><span class="line"></span><br><span class="line">      <span class="keyword">break</span>;</span><br><span class="line"></span><br><span class="line">    <span class="attr">default</span>:</span><br><span class="line">      [<span class="string">&#x27;title&#x27;</span>, <span class="string">&#x27;html&#x27;</span>, <span class="string">&#x27;type&#x27;</span>].<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">name, index</span>) &#123;</span><br><span class="line">        <span class="keyword">switch</span> (<span class="title function_">_typeof</span>(args[index])) &#123;</span><br><span class="line">          <span class="keyword">case</span> <span class="string">&#x27;string&#x27;</span>:</span><br><span class="line">            params[name] = args[index];</span><br><span class="line">            <span class="keyword">break</span>;</span><br><span class="line"></span><br><span class="line">          <span class="keyword">case</span> <span class="string">&#x27;undefined&#x27;</span>:</span><br><span class="line">            <span class="keyword">break</span>;</span><br><span class="line"></span><br><span class="line">          <span class="attr">default</span>:</span><br><span class="line">            <span class="title function_">error</span>(<span class="string">&quot;Unexpected type of &quot;</span>.<span class="title function_">concat</span>(name, <span class="string">&quot;! Expected \&quot;string\&quot;, got &quot;</span>).<span class="title function_">concat</span>(<span class="title function_">_typeof</span>(args[index])));</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> params;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> swalPrefix = <span class="string">&#x27;swal2-&#x27;</span>;</span><br><span class="line"><span class="keyword">var</span> prefix = <span class="keyword">function</span> <span class="title function_">prefix</span>(<span class="params">items</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> result = &#123;&#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i <span class="keyword">in</span> items) &#123;</span><br><span class="line">    result[items[i]] = swalPrefix + items[i];</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> result;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> swalClasses = <span class="title function_">prefix</span>([<span class="string">&#x27;container&#x27;</span>, <span class="string">&#x27;shown&#x27;</span>, <span class="string">&#x27;height-auto&#x27;</span>, <span class="string">&#x27;iosfix&#x27;</span>, <span class="string">&#x27;popup&#x27;</span>, <span class="string">&#x27;modal&#x27;</span>, <span class="string">&#x27;no-backdrop&#x27;</span>, <span class="string">&#x27;toast&#x27;</span>, <span class="string">&#x27;toast-shown&#x27;</span>, <span class="string">&#x27;toast-column&#x27;</span>, <span class="string">&#x27;show&#x27;</span>, <span class="string">&#x27;hide&#x27;</span>, <span class="string">&#x27;noanimation&#x27;</span>, <span class="string">&#x27;close&#x27;</span>, <span class="string">&#x27;title&#x27;</span>, <span class="string">&#x27;header&#x27;</span>, <span class="string">&#x27;content&#x27;</span>, <span class="string">&#x27;actions&#x27;</span>, <span class="string">&#x27;confirm&#x27;</span>, <span class="string">&#x27;cancel&#x27;</span>, <span class="string">&#x27;footer&#x27;</span>, <span class="string">&#x27;icon&#x27;</span>, <span class="string">&#x27;image&#x27;</span>, <span class="string">&#x27;input&#x27;</span>, <span class="string">&#x27;file&#x27;</span>, <span class="string">&#x27;range&#x27;</span>, <span class="string">&#x27;select&#x27;</span>, <span class="string">&#x27;radio&#x27;</span>, <span class="string">&#x27;checkbox&#x27;</span>, <span class="string">&#x27;label&#x27;</span>, <span class="string">&#x27;textarea&#x27;</span>, <span class="string">&#x27;inputerror&#x27;</span>, <span class="string">&#x27;validation-message&#x27;</span>, <span class="string">&#x27;progress-steps&#x27;</span>, <span class="string">&#x27;active-progress-step&#x27;</span>, <span class="string">&#x27;progress-step&#x27;</span>, <span class="string">&#x27;progress-step-line&#x27;</span>, <span class="string">&#x27;loading&#x27;</span>, <span class="string">&#x27;styled&#x27;</span>, <span class="string">&#x27;top&#x27;</span>, <span class="string">&#x27;top-start&#x27;</span>, <span class="string">&#x27;top-end&#x27;</span>, <span class="string">&#x27;top-left&#x27;</span>, <span class="string">&#x27;top-right&#x27;</span>, <span class="string">&#x27;center&#x27;</span>, <span class="string">&#x27;center-start&#x27;</span>, <span class="string">&#x27;center-end&#x27;</span>, <span class="string">&#x27;center-left&#x27;</span>, <span class="string">&#x27;center-right&#x27;</span>, <span class="string">&#x27;bottom&#x27;</span>, <span class="string">&#x27;bottom-start&#x27;</span>, <span class="string">&#x27;bottom-end&#x27;</span>, <span class="string">&#x27;bottom-left&#x27;</span>, <span class="string">&#x27;bottom-right&#x27;</span>, <span class="string">&#x27;grow-row&#x27;</span>, <span class="string">&#x27;grow-column&#x27;</span>, <span class="string">&#x27;grow-fullscreen&#x27;</span>, <span class="string">&#x27;rtl&#x27;</span>]);</span><br><span class="line"><span class="keyword">var</span> iconTypes = <span class="title function_">prefix</span>([<span class="string">&#x27;success&#x27;</span>, <span class="string">&#x27;warning&#x27;</span>, <span class="string">&#x27;info&#x27;</span>, <span class="string">&#x27;question&#x27;</span>, <span class="string">&#x27;error&#x27;</span>]);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> states = &#123;</span><br><span class="line">  <span class="attr">previousBodyPadding</span>: <span class="literal">null</span></span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> hasClass = <span class="keyword">function</span> <span class="title function_">hasClass</span>(<span class="params">elem, className</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> elem.<span class="property">classList</span>.<span class="title function_">contains</span>(className);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> removeCustomClasses = <span class="keyword">function</span> <span class="title function_">removeCustomClasses</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  <span class="title function_">toArray</span>(elem.<span class="property">classList</span>).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">className</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (!(<span class="title function_">objectValues</span>(swalClasses).<span class="title function_">indexOf</span>(className) !== -<span class="number">1</span>) &amp;&amp; !(<span class="title function_">objectValues</span>(iconTypes).<span class="title function_">indexOf</span>(className) !== -<span class="number">1</span>)) &#123;</span><br><span class="line">      elem.<span class="property">classList</span>.<span class="title function_">remove</span>(className);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> applyCustomClass = <span class="keyword">function</span> <span class="title function_">applyCustomClass</span>(<span class="params">elem, customClass, className</span>) &#123;</span><br><span class="line">  <span class="title function_">removeCustomClasses</span>(elem);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (customClass &amp;&amp; customClass[className]) &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="keyword">typeof</span> customClass[className] !== <span class="string">&#x27;string&#x27;</span> &amp;&amp; !customClass[className].<span class="property">forEach</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">warn</span>(<span class="string">&quot;Invalid type of customClass.&quot;</span>.<span class="title function_">concat</span>(className, <span class="string">&quot;! Expected string or iterable object, got \&quot;&quot;</span>).<span class="title function_">concat</span>(<span class="title function_">_typeof</span>(customClass[className]), <span class="string">&quot;\&quot;&quot;</span>));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">addClass</span>(elem, customClass[className]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getInput</span>(<span class="params">content, inputType</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!inputType) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">switch</span> (inputType) &#123;</span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;select&#x27;</span>:</span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;textarea&#x27;</span>:</span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;file&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">getChildByClass</span>(content, swalClasses[inputType]);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;checkbox&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">checkbox</span>, <span class="string">&quot; input&quot;</span>));</span><br><span class="line"></span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;radio&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">radio</span>, <span class="string">&quot; input:checked&quot;</span>)) || content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">radio</span>, <span class="string">&quot; input:first-child&quot;</span>));</span><br><span class="line"></span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;range&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">range</span>, <span class="string">&quot; input&quot;</span>));</span><br><span class="line"></span><br><span class="line">    <span class="attr">default</span>:</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">input</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">var</span> focusInput = <span class="keyword">function</span> <span class="title function_">focusInput</span>(<span class="params">input</span>) &#123;</span><br><span class="line">  input.<span class="title function_">focus</span>(); <span class="comment">// place cursor at end of text in text input</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (input.<span class="property">type</span> !== <span class="string">&#x27;file&#x27;</span>) &#123;</span><br><span class="line">    <span class="comment">// http://stackoverflow.com/a/2345915</span></span><br><span class="line">    <span class="keyword">var</span> val = input.<span class="property">value</span>;</span><br><span class="line">    input.<span class="property">value</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    input.<span class="property">value</span> = val;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> toggleClass = <span class="keyword">function</span> <span class="title function_">toggleClass</span>(<span class="params">target, classList, condition</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!target || !classList) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> classList === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">    classList = classList.<span class="title function_">split</span>(<span class="regexp">/\s+/</span>).<span class="title function_">filter</span>(<span class="title class_">Boolean</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  classList.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">className</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (target.<span class="property">forEach</span>) &#123;</span><br><span class="line">      target.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">elem</span>) &#123;</span><br><span class="line">        condition ? elem.<span class="property">classList</span>.<span class="title function_">add</span>(className) : elem.<span class="property">classList</span>.<span class="title function_">remove</span>(className);</span><br><span class="line">      &#125;);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      condition ? target.<span class="property">classList</span>.<span class="title function_">add</span>(className) : target.<span class="property">classList</span>.<span class="title function_">remove</span>(className);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> addClass = <span class="keyword">function</span> <span class="title function_">addClass</span>(<span class="params">target, classList</span>) &#123;</span><br><span class="line">  <span class="title function_">toggleClass</span>(target, classList, <span class="literal">true</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> removeClass = <span class="keyword">function</span> <span class="title function_">removeClass</span>(<span class="params">target, classList</span>) &#123;</span><br><span class="line">  <span class="title function_">toggleClass</span>(target, classList, <span class="literal">false</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getChildByClass = <span class="keyword">function</span> <span class="title function_">getChildByClass</span>(<span class="params">elem, className</span>) &#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; elem.<span class="property">childNodes</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="title function_">hasClass</span>(elem.<span class="property">childNodes</span>[i], className)) &#123;</span><br><span class="line">      <span class="keyword">return</span> elem.<span class="property">childNodes</span>[i];</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> applyNumericalStyle = <span class="keyword">function</span> <span class="title function_">applyNumericalStyle</span>(<span class="params">elem, property, value</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (value || <span class="built_in">parseInt</span>(value) === <span class="number">0</span>) &#123;</span><br><span class="line">    elem.<span class="property">style</span>[property] = <span class="keyword">typeof</span> value === <span class="string">&#x27;number&#x27;</span> ? value + <span class="string">&#x27;px&#x27;</span> : value;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    elem.<span class="property">style</span>.<span class="title function_">removeProperty</span>(property);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> show = <span class="keyword">function</span> <span class="title function_">show</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> display = <span class="variable language_">arguments</span>.<span class="property">length</span> &gt; <span class="number">1</span> &amp;&amp; <span class="variable language_">arguments</span>[<span class="number">1</span>] !== <span class="literal">undefined</span> ? <span class="variable language_">arguments</span>[<span class="number">1</span>] : <span class="string">&#x27;flex&#x27;</span>;</span><br><span class="line">  elem.<span class="property">style</span>.<span class="property">opacity</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  elem.<span class="property">style</span>.<span class="property">display</span> = display;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> hide = <span class="keyword">function</span> <span class="title function_">hide</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  elem.<span class="property">style</span>.<span class="property">opacity</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  elem.<span class="property">style</span>.<span class="property">display</span> = <span class="string">&#x27;none&#x27;</span>;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> toggle = <span class="keyword">function</span> <span class="title function_">toggle</span>(<span class="params">elem, condition, display</span>) &#123;</span><br><span class="line">  condition ? <span class="title function_">show</span>(elem, display) : <span class="title function_">hide</span>(elem);</span><br><span class="line">&#125;; <span class="comment">// borrowed from jquery $(elem).is(&#x27;:visible&#x27;) implementation</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isVisible = <span class="keyword">function</span> <span class="title function_">isVisible</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> !!(elem &amp;&amp; (elem.<span class="property">offsetWidth</span> || elem.<span class="property">offsetHeight</span> || elem.<span class="title function_">getClientRects</span>().<span class="property">length</span>));</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> isScrollable = <span class="keyword">function</span> <span class="title function_">isScrollable</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> !!(elem.<span class="property">scrollHeight</span> &gt; elem.<span class="property">clientHeight</span>);</span><br><span class="line">&#125;; <span class="comment">// borrowed from https://stackoverflow.com/a/46352119</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> hasCssAnimation = <span class="keyword">function</span> <span class="title function_">hasCssAnimation</span>(<span class="params">elem</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> style = <span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(elem);</span><br><span class="line">  <span class="keyword">var</span> animDuration = <span class="built_in">parseFloat</span>(style.<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;animation-duration&#x27;</span>) || <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line">  <span class="keyword">var</span> transDuration = <span class="built_in">parseFloat</span>(style.<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;transition-duration&#x27;</span>) || <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line">  <span class="keyword">return</span> animDuration &gt; <span class="number">0</span> || transDuration &gt; <span class="number">0</span>;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> contains = <span class="keyword">function</span> <span class="title function_">contains</span>(<span class="params">haystack, needle</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> haystack.<span class="property">contains</span> === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> haystack.<span class="title function_">contains</span>(needle);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getContainer = <span class="keyword">function</span> <span class="title function_">getContainer</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">querySelector</span>(<span class="string">&#x27;.&#x27;</span> + swalClasses.<span class="property">container</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> elementBySelector = <span class="keyword">function</span> <span class="title function_">elementBySelector</span>(<span class="params">selectorString</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>();</span><br><span class="line">  <span class="keyword">return</span> container ? container.<span class="title function_">querySelector</span>(selectorString) : <span class="literal">null</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> elementByClass = <span class="keyword">function</span> <span class="title function_">elementByClass</span>(<span class="params">className</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementBySelector</span>(<span class="string">&#x27;.&#x27;</span> + className);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getPopup = <span class="keyword">function</span> <span class="title function_">getPopup</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">popup</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getIcons = <span class="keyword">function</span> <span class="title function_">getIcons</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">toArray</span>(popup.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;.&#x27;</span> + swalClasses.<span class="property">icon</span>));</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getIcon = <span class="keyword">function</span> <span class="title function_">getIcon</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> visibleIcon = <span class="title function_">getIcons</span>().<span class="title function_">filter</span>(<span class="keyword">function</span> (<span class="params">icon</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">isVisible</span>(icon);</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">return</span> visibleIcon.<span class="property">length</span> ? visibleIcon[<span class="number">0</span>] : <span class="literal">null</span>;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getTitle = <span class="keyword">function</span> <span class="title function_">getTitle</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">title</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getContent = <span class="keyword">function</span> <span class="title function_">getContent</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">content</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getImage = <span class="keyword">function</span> <span class="title function_">getImage</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">image</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getProgressSteps = <span class="keyword">function</span> <span class="title function_">getProgressSteps</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses[<span class="string">&#x27;progress-steps&#x27;</span>]);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getValidationMessage = <span class="keyword">function</span> <span class="title function_">getValidationMessage</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses[<span class="string">&#x27;validation-message&#x27;</span>]);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getConfirmButton = <span class="keyword">function</span> <span class="title function_">getConfirmButton</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementBySelector</span>(<span class="string">&#x27;.&#x27;</span> + swalClasses.<span class="property">actions</span> + <span class="string">&#x27; .&#x27;</span> + swalClasses.<span class="property">confirm</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getCancelButton = <span class="keyword">function</span> <span class="title function_">getCancelButton</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementBySelector</span>(<span class="string">&#x27;.&#x27;</span> + swalClasses.<span class="property">actions</span> + <span class="string">&#x27; .&#x27;</span> + swalClasses.<span class="property">cancel</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getActions = <span class="keyword">function</span> <span class="title function_">getActions</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">actions</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getHeader = <span class="keyword">function</span> <span class="title function_">getHeader</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">header</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getFooter = <span class="keyword">function</span> <span class="title function_">getFooter</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">footer</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getCloseButton = <span class="keyword">function</span> <span class="title function_">getCloseButton</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">elementByClass</span>(swalClasses.<span class="property">close</span>);</span><br><span class="line">&#125;; <span class="comment">// https://github.com/jkup/focusable/blob/master/index.js</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> focusable = <span class="string">&quot;\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex=\&quot;0\&quot;],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n&quot;</span>;</span><br><span class="line"><span class="keyword">var</span> getFocusableElements = <span class="keyword">function</span> <span class="title function_">getFocusableElements</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> focusableElementsWithTabindex = <span class="title function_">toArray</span>(<span class="title function_">getPopup</span>().<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;[tabindex]:not([tabindex=&quot;-1&quot;]):not([tabindex=&quot;0&quot;])&#x27;</span>)) <span class="comment">// sort according to tabindex</span></span><br><span class="line">  .<span class="title function_">sort</span>(<span class="keyword">function</span> (<span class="params">a, b</span>) &#123;</span><br><span class="line">    a = <span class="built_in">parseInt</span>(a.<span class="title function_">getAttribute</span>(<span class="string">&#x27;tabindex&#x27;</span>));</span><br><span class="line">    b = <span class="built_in">parseInt</span>(b.<span class="title function_">getAttribute</span>(<span class="string">&#x27;tabindex&#x27;</span>));</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (a &gt; b) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="number">1</span>;</span><br><span class="line">    &#125; <span class="keyword">else</span> <span class="keyword">if</span> (a &lt; b) &#123;</span><br><span class="line">      <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">var</span> otherFocusableElements = <span class="title function_">toArray</span>(<span class="title function_">getPopup</span>().<span class="title function_">querySelectorAll</span>(focusable)).<span class="title function_">filter</span>(<span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> el.<span class="title function_">getAttribute</span>(<span class="string">&#x27;tabindex&#x27;</span>) !== <span class="string">&#x27;-1&#x27;</span>;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">uniqueArray</span>(focusableElementsWithTabindex.<span class="title function_">concat</span>(otherFocusableElements)).<span class="title function_">filter</span>(<span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">isVisible</span>(el);</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> isModal = <span class="keyword">function</span> <span class="title function_">isModal</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> !<span class="title function_">isToast</span>() &amp;&amp; !<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">classList</span>.<span class="title function_">contains</span>(swalClasses[<span class="string">&#x27;no-backdrop&#x27;</span>]);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> isToast = <span class="keyword">function</span> <span class="title function_">isToast</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">classList</span>.<span class="title function_">contains</span>(swalClasses[<span class="string">&#x27;toast-shown&#x27;</span>]);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> isLoading = <span class="keyword">function</span> <span class="title function_">isLoading</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">getPopup</span>().<span class="title function_">hasAttribute</span>(<span class="string">&#x27;data-loading&#x27;</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">// Detect Node env</span></span><br><span class="line"><span class="keyword">var</span> isNodeEnv = <span class="keyword">function</span> <span class="title function_">isNodeEnv</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">typeof</span> <span class="variable language_">window</span> === <span class="string">&#x27;undefined&#x27;</span> || <span class="keyword">typeof</span> <span class="variable language_">document</span> === <span class="string">&#x27;undefined&#x27;</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> sweetHTML = <span class="string">&quot;\n &lt;div aria-labelledby=\&quot;&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">title</span>, <span class="string">&quot;\&quot; aria-describedby=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">content</span>, <span class="string">&quot;\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">popup</span>, <span class="string">&quot;\&quot; tabindex=\&quot;-1\&quot;&gt;\n   &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">header</span>, <span class="string">&quot;\&quot;&gt;\n     &lt;ul class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses[<span class="string">&#x27;progress-steps&#x27;</span>], <span class="string">&quot;\&quot;&gt;&lt;/ul&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(iconTypes.<span class="property">error</span>, <span class="string">&quot;\&quot;&gt;\n       &lt;span class=\&quot;swal2-x-mark\&quot;&gt;&lt;span class=\&quot;swal2-x-mark-line-left\&quot;&gt;&lt;/span&gt;&lt;span class=\&quot;swal2-x-mark-line-right\&quot;&gt;&lt;/span&gt;&lt;/span&gt;\n     &lt;/div&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(iconTypes.<span class="property">question</span>, <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(iconTypes.<span class="property">warning</span>, <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(iconTypes.<span class="property">info</span>, <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot; &quot;</span>).<span class="title function_">concat</span>(iconTypes.<span class="property">success</span>, <span class="string">&quot;\&quot;&gt;\n       &lt;div class=\&quot;swal2-success-circular-line-left\&quot;&gt;&lt;/div&gt;\n       &lt;span class=\&quot;swal2-success-line-tip\&quot;&gt;&lt;/span&gt; &lt;span class=\&quot;swal2-success-line-long\&quot;&gt;&lt;/span&gt;\n       &lt;div class=\&quot;swal2-success-ring\&quot;&gt;&lt;/div&gt; &lt;div class=\&quot;swal2-success-fix\&quot;&gt;&lt;/div&gt;\n       &lt;div class=\&quot;swal2-success-circular-line-right\&quot;&gt;&lt;/div&gt;\n     &lt;/div&gt;\n     &lt;img class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">image</span>, <span class="string">&quot;\&quot; /&gt;\n     &lt;h2 class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">title</span>, <span class="string">&quot;\&quot; id=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">title</span>, <span class="string">&quot;\&quot;&gt;&lt;/h2&gt;\n     &lt;button type=\&quot;button\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">close</span>, <span class="string">&quot;\&quot;&gt;&lt;/button&gt;\n   &lt;/div&gt;\n   &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">content</span>, <span class="string">&quot;\&quot;&gt;\n     &lt;div id=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">content</span>, <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n     &lt;input class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">input</span>, <span class="string">&quot;\&quot; /&gt;\n     &lt;input type=\&quot;file\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">file</span>, <span class="string">&quot;\&quot; /&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">range</span>, <span class="string">&quot;\&quot;&gt;\n       &lt;input type=\&quot;range\&quot; /&gt;\n       &lt;output&gt;&lt;/output&gt;\n     &lt;/div&gt;\n     &lt;select class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">select</span>, <span class="string">&quot;\&quot;&gt;&lt;/select&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">radio</span>, <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n     &lt;label for=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">checkbox</span>, <span class="string">&quot;\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">checkbox</span>, <span class="string">&quot;\&quot;&gt;\n       &lt;input type=\&quot;checkbox\&quot; /&gt;\n       &lt;span class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">label</span>, <span class="string">&quot;\&quot;&gt;&lt;/span&gt;\n     &lt;/label&gt;\n     &lt;textarea class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">textarea</span>, <span class="string">&quot;\&quot;&gt;&lt;/textarea&gt;\n     &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses[<span class="string">&#x27;validation-message&#x27;</span>], <span class="string">&quot;\&quot; id=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses[<span class="string">&#x27;validation-message&#x27;</span>], <span class="string">&quot;\&quot;&gt;&lt;/div&gt;\n   &lt;/div&gt;\n   &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">actions</span>, <span class="string">&quot;\&quot;&gt;\n     &lt;button type=\&quot;button\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">confirm</span>, <span class="string">&quot;\&quot;&gt;OK&lt;/button&gt;\n     &lt;button type=\&quot;button\&quot; class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">cancel</span>, <span class="string">&quot;\&quot;&gt;Cancel&lt;/button&gt;\n   &lt;/div&gt;\n   &lt;div class=\&quot;&quot;</span>).<span class="title function_">concat</span>(swalClasses.<span class="property">footer</span>, <span class="string">&quot;\&quot;&gt;\n   &lt;/div&gt;\n &lt;/div&gt;\n&quot;</span>).<span class="title function_">replace</span>(<span class="regexp">/(^|\n)\s*/g</span>, <span class="string">&#x27;&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> resetOldContainer = <span class="keyword">function</span> <span class="title function_">resetOldContainer</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> oldContainer = <span class="title function_">getContainer</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!oldContainer) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  oldContainer.<span class="property">parentNode</span>.<span class="title function_">removeChild</span>(oldContainer);</span><br><span class="line">  <span class="title function_">removeClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>], [swalClasses[<span class="string">&#x27;no-backdrop&#x27;</span>], swalClasses[<span class="string">&#x27;toast-shown&#x27;</span>], swalClasses[<span class="string">&#x27;has-column&#x27;</span>]]);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> oldInputVal; <span class="comment">// IE11 workaround, see #1109 for details</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> resetValidationMessage = <span class="keyword">function</span> <span class="title function_">resetValidationMessage</span>(<span class="params">e</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title class_">Swal</span>.<span class="title function_">isVisible</span>() &amp;&amp; oldInputVal !== e.<span class="property">target</span>.<span class="property">value</span>) &#123;</span><br><span class="line">    <span class="title class_">Swal</span>.<span class="title function_">resetValidationMessage</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  oldInputVal = e.<span class="property">target</span>.<span class="property">value</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> addInputChangeListeners = <span class="keyword">function</span> <span class="title function_">addInputChangeListeners</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> content = <span class="title function_">getContent</span>();</span><br><span class="line">  <span class="keyword">var</span> input = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">input</span>);</span><br><span class="line">  <span class="keyword">var</span> file = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">file</span>);</span><br><span class="line">  <span class="keyword">var</span> range = content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">range</span>, <span class="string">&quot; input&quot;</span>));</span><br><span class="line">  <span class="keyword">var</span> rangeOutput = content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">range</span>, <span class="string">&quot; output&quot;</span>));</span><br><span class="line">  <span class="keyword">var</span> select = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">select</span>);</span><br><span class="line">  <span class="keyword">var</span> checkbox = content.<span class="title function_">querySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">checkbox</span>, <span class="string">&quot; input&quot;</span>));</span><br><span class="line">  <span class="keyword">var</span> textarea = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">textarea</span>);</span><br><span class="line">  input.<span class="property">oninput</span> = resetValidationMessage;</span><br><span class="line">  file.<span class="property">onchange</span> = resetValidationMessage;</span><br><span class="line">  select.<span class="property">onchange</span> = resetValidationMessage;</span><br><span class="line">  checkbox.<span class="property">onchange</span> = resetValidationMessage;</span><br><span class="line">  textarea.<span class="property">oninput</span> = resetValidationMessage;</span><br><span class="line"></span><br><span class="line">  range.<span class="property">oninput</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    <span class="title function_">resetValidationMessage</span>(e);</span><br><span class="line">    rangeOutput.<span class="property">value</span> = range.<span class="property">value</span>;</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  range.<span class="property">onchange</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    <span class="title function_">resetValidationMessage</span>(e);</span><br><span class="line">    range.<span class="property">nextSibling</span>.<span class="property">value</span> = range.<span class="property">value</span>;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getTarget = <span class="keyword">function</span> <span class="title function_">getTarget</span>(<span class="params">target</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">typeof</span> target === <span class="string">&#x27;string&#x27;</span> ? <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(target) : target;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setupAccessibility = <span class="keyword">function</span> <span class="title function_">setupAccessibility</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line">  popup.<span class="title function_">setAttribute</span>(<span class="string">&#x27;role&#x27;</span>, params.<span class="property">toast</span> ? <span class="string">&#x27;alert&#x27;</span> : <span class="string">&#x27;dialog&#x27;</span>);</span><br><span class="line">  popup.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-live&#x27;</span>, params.<span class="property">toast</span> ? <span class="string">&#x27;polite&#x27;</span> : <span class="string">&#x27;assertive&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">toast</span>) &#123;</span><br><span class="line">    popup.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-modal&#x27;</span>, <span class="string">&#x27;true&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setupRTL = <span class="keyword">function</span> <span class="title function_">setupRTL</span>(<span class="params">targetElement</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(targetElement).<span class="property">direction</span> === <span class="string">&#x27;rtl&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(<span class="title function_">getContainer</span>(), swalClasses.<span class="property">rtl</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Add modal + backdrop to DOM</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> init = <span class="keyword">function</span> <span class="title function_">init</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="comment">// Clean up the old popup container if it exists</span></span><br><span class="line">  <span class="title function_">resetOldContainer</span>();</span><br><span class="line">  <span class="comment">/* istanbul ignore if */</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isNodeEnv</span>()) &#123;</span><br><span class="line">    <span class="title function_">error</span>(<span class="string">&#x27;SweetAlert2 requires document to initialize&#x27;</span>);</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> container = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;div&#x27;</span>);</span><br><span class="line">  container.<span class="property">className</span> = swalClasses.<span class="property">container</span>;</span><br><span class="line">  container.<span class="property">innerHTML</span> = sweetHTML;</span><br><span class="line">  <span class="keyword">var</span> targetElement = <span class="title function_">getTarget</span>(params.<span class="property">target</span>);</span><br><span class="line">  targetElement.<span class="title function_">appendChild</span>(container);</span><br><span class="line">  <span class="title function_">setupAccessibility</span>(params);</span><br><span class="line">  <span class="title function_">setupRTL</span>(targetElement);</span><br><span class="line">  <span class="title function_">addInputChangeListeners</span>();</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> parseHtmlToContainer = <span class="keyword">function</span> <span class="title function_">parseHtmlToContainer</span>(<span class="params">param, target</span>) &#123;</span><br><span class="line">  <span class="comment">// DOM element</span></span><br><span class="line">  <span class="keyword">if</span> (param <span class="keyword">instanceof</span> <span class="title class_">HTMLElement</span>) &#123;</span><br><span class="line">    target.<span class="title function_">appendChild</span>(param); <span class="comment">// JQuery element(s)</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="title function_">_typeof</span>(param) === <span class="string">&#x27;object&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">handleJqueryElem</span>(target, param); <span class="comment">// Plain string</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (param) &#123;</span><br><span class="line">    target.<span class="property">innerHTML</span> = param;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleJqueryElem = <span class="keyword">function</span> <span class="title function_">handleJqueryElem</span>(<span class="params">target, elem</span>) &#123;</span><br><span class="line">  target.<span class="property">innerHTML</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="number">0</span> <span class="keyword">in</span> elem) &#123;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i <span class="keyword">in</span> elem; i++) &#123;</span><br><span class="line">      target.<span class="title function_">appendChild</span>(elem[i].<span class="title function_">cloneNode</span>(<span class="literal">true</span>));</span><br><span class="line">    &#125;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    target.<span class="title function_">appendChild</span>(elem.<span class="title function_">cloneNode</span>(<span class="literal">true</span>));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> animationEndEvent = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">  <span class="comment">// Prevent run in Node env</span></span><br><span class="line"></span><br><span class="line">  <span class="comment">/* istanbul ignore if */</span></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isNodeEnv</span>()) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> testEl = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;div&#x27;</span>);</span><br><span class="line">  <span class="keyword">var</span> transEndEventNames = &#123;</span><br><span class="line">    <span class="title class_">WebkitAnimation</span>: <span class="string">&#x27;webkitAnimationEnd&#x27;</span>,</span><br><span class="line">    <span class="title class_">OAnimation</span>: <span class="string">&#x27;oAnimationEnd oanimationend&#x27;</span>,</span><br><span class="line">    <span class="attr">animation</span>: <span class="string">&#x27;animationend&#x27;</span></span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i <span class="keyword">in</span> transEndEventNames) &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="title class_">Object</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">hasOwnProperty</span>.<span class="title function_">call</span>(transEndEventNames, i) &amp;&amp; <span class="keyword">typeof</span> testEl.<span class="property">style</span>[i] !== <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> transEndEventNames[i];</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">&#125;();</span><br><span class="line"></span><br><span class="line"><span class="comment">// Measure width of scrollbar</span></span><br><span class="line"><span class="comment">// https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286</span></span><br><span class="line"><span class="keyword">var</span> measureScrollbar = <span class="keyword">function</span> <span class="title function_">measureScrollbar</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> supportsTouch = <span class="string">&#x27;ontouchstart&#x27;</span> <span class="keyword">in</span> <span class="variable language_">window</span> || navigator.<span class="property">msMaxTouchPoints</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (supportsTouch) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> scrollDiv = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;div&#x27;</span>);</span><br><span class="line">  scrollDiv.<span class="property">style</span>.<span class="property">width</span> = <span class="string">&#x27;50px&#x27;</span>;</span><br><span class="line">  scrollDiv.<span class="property">style</span>.<span class="property">height</span> = <span class="string">&#x27;50px&#x27;</span>;</span><br><span class="line">  scrollDiv.<span class="property">style</span>.<span class="property">overflow</span> = <span class="string">&#x27;scroll&#x27;</span>;</span><br><span class="line">  <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">appendChild</span>(scrollDiv);</span><br><span class="line">  <span class="keyword">var</span> scrollbarWidth = scrollDiv.<span class="property">offsetWidth</span> - scrollDiv.<span class="property">clientWidth</span>;</span><br><span class="line">  <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">removeChild</span>(scrollDiv);</span><br><span class="line">  <span class="keyword">return</span> scrollbarWidth;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderActions = <span class="keyword">function</span> <span class="title function_">renderActions</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> actions = <span class="title function_">getActions</span>();</span><br><span class="line">  <span class="keyword">var</span> confirmButton = <span class="title function_">getConfirmButton</span>();</span><br><span class="line">  <span class="keyword">var</span> cancelButton = <span class="title function_">getCancelButton</span>(); <span class="comment">// Actions (buttons) wrapper</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">showConfirmButton</span> &amp;&amp; !params.<span class="property">showCancelButton</span>) &#123;</span><br><span class="line">    <span class="title function_">hide</span>(actions);</span><br><span class="line">  &#125; <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(actions, params.<span class="property">customClass</span>, <span class="string">&#x27;actions&#x27;</span>); <span class="comment">// Render confirm button</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderButton</span>(confirmButton, <span class="string">&#x27;confirm&#x27;</span>, params); <span class="comment">// render Cancel Button</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderButton</span>(cancelButton, <span class="string">&#x27;cancel&#x27;</span>, params);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">buttonsStyling</span>) &#123;</span><br><span class="line">    <span class="title function_">handleButtonsStyling</span>(confirmButton, cancelButton, params);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">removeClass</span>([confirmButton, cancelButton], swalClasses.<span class="property">styled</span>);</span><br><span class="line">    confirmButton.<span class="property">style</span>.<span class="property">backgroundColor</span> = confirmButton.<span class="property">style</span>.<span class="property">borderLeftColor</span> = confirmButton.<span class="property">style</span>.<span class="property">borderRightColor</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    cancelButton.<span class="property">style</span>.<span class="property">backgroundColor</span> = cancelButton.<span class="property">style</span>.<span class="property">borderLeftColor</span> = cancelButton.<span class="property">style</span>.<span class="property">borderRightColor</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">reverseButtons</span>) &#123;</span><br><span class="line">    confirmButton.<span class="property">parentNode</span>.<span class="title function_">insertBefore</span>(cancelButton, confirmButton);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handleButtonsStyling</span>(<span class="params">confirmButton, cancelButton, params</span>) &#123;</span><br><span class="line">  <span class="title function_">addClass</span>([confirmButton, cancelButton], swalClasses.<span class="property">styled</span>); <span class="comment">// Buttons background colors</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">confirmButtonColor</span>) &#123;</span><br><span class="line">    confirmButton.<span class="property">style</span>.<span class="property">backgroundColor</span> = params.<span class="property">confirmButtonColor</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">cancelButtonColor</span>) &#123;</span><br><span class="line">    cancelButton.<span class="property">style</span>.<span class="property">backgroundColor</span> = params.<span class="property">cancelButtonColor</span>;</span><br><span class="line">  &#125; <span class="comment">// Loading state</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> confirmButtonBackgroundColor = <span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(confirmButton).<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;background-color&#x27;</span>);</span><br><span class="line">  confirmButton.<span class="property">style</span>.<span class="property">borderLeftColor</span> = confirmButtonBackgroundColor;</span><br><span class="line">  confirmButton.<span class="property">style</span>.<span class="property">borderRightColor</span> = confirmButtonBackgroundColor;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">renderButton</span>(<span class="params">button, buttonType, params</span>) &#123;</span><br><span class="line">  <span class="title function_">toggle</span>(button, params[<span class="string">&#x27;showC&#x27;</span> + buttonType.<span class="title function_">substring</span>(<span class="number">1</span>) + <span class="string">&#x27;Button&#x27;</span>], <span class="string">&#x27;inline-block&#x27;</span>);</span><br><span class="line">  button.<span class="property">innerHTML</span> = params[buttonType + <span class="string">&#x27;ButtonText&#x27;</span>]; <span class="comment">// Set caption text</span></span><br><span class="line"></span><br><span class="line">  button.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-label&#x27;</span>, params[buttonType + <span class="string">&#x27;ButtonAriaLabel&#x27;</span>]); <span class="comment">// ARIA label</span></span><br><span class="line">  <span class="comment">// Add buttons custom classes</span></span><br><span class="line"></span><br><span class="line">  button.<span class="property">className</span> = swalClasses[buttonType];</span><br><span class="line">  <span class="title function_">applyCustomClass</span>(button, params.<span class="property">customClass</span>, buttonType + <span class="string">&#x27;Button&#x27;</span>);</span><br><span class="line">  <span class="title function_">addClass</span>(button, params[buttonType + <span class="string">&#x27;ButtonClass&#x27;</span>]);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handleBackdropParam</span>(<span class="params">container, backdrop</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> backdrop === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">    container.<span class="property">style</span>.<span class="property">background</span> = backdrop;</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (!backdrop) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>], swalClasses[<span class="string">&#x27;no-backdrop&#x27;</span>]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handlePositionParam</span>(<span class="params">container, position</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (position <span class="keyword">in</span> swalClasses) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(container, swalClasses[position]);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&#x27;The &quot;position&quot; parameter is not valid, defaulting to &quot;center&quot;&#x27;</span>);</span><br><span class="line">    <span class="title function_">addClass</span>(container, swalClasses.<span class="property">center</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handleGrowParam</span>(<span class="params">container, grow</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (grow &amp;&amp; <span class="keyword">typeof</span> grow === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> growClass = <span class="string">&#x27;grow-&#x27;</span> + grow;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (growClass <span class="keyword">in</span> swalClasses) &#123;</span><br><span class="line">      <span class="title function_">addClass</span>(container, swalClasses[growClass]);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderContainer = <span class="keyword">function</span> <span class="title function_">renderContainer</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!container) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">handleBackdropParam</span>(container, params.<span class="property">backdrop</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">backdrop</span> &amp;&amp; params.<span class="property">allowOutsideClick</span>) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&#x27;&quot;allowOutsideClick&quot; parameter requires `backdrop` parameter to be set to `true`&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">handlePositionParam</span>(container, params.<span class="property">position</span>);</span><br><span class="line">  <span class="title function_">handleGrowParam</span>(container, params.<span class="property">grow</span>); <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(container, params.<span class="property">customClass</span>, <span class="string">&#x27;container&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">customContainerClass</span>) &#123;</span><br><span class="line">    <span class="comment">// @deprecated</span></span><br><span class="line">    <span class="title function_">addClass</span>(container, params.<span class="property">customContainerClass</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * This module containts `WeakMap`s for each effectively-&quot;private  property&quot; that a `Swal` has.</span></span><br><span class="line"><span class="comment"> * For example, to set the private property &quot;foo&quot; of `this` to &quot;bar&quot;, you can `privateProps.foo.set(this, &#x27;bar&#x27;)`</span></span><br><span class="line"><span class="comment"> * This is the approach that Babel will probably take to implement private methods/fields</span></span><br><span class="line"><span class="comment"> *   https://github.com/tc39/proposal-private-methods</span></span><br><span class="line"><span class="comment"> *   https://github.com/babel/babel/pull/7555</span></span><br><span class="line"><span class="comment"> * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*</span></span><br><span class="line"><span class="comment"> *   then we can use that language feature.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">var</span> privateProps = &#123;</span><br><span class="line">  <span class="attr">promise</span>: <span class="keyword">new</span> <span class="title class_">WeakMap</span>(),</span><br><span class="line">  <span class="attr">innerParams</span>: <span class="keyword">new</span> <span class="title class_">WeakMap</span>(),</span><br><span class="line">  <span class="attr">domCache</span>: <span class="keyword">new</span> <span class="title class_">WeakMap</span>()</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> inputTypes = [<span class="string">&#x27;input&#x27;</span>, <span class="string">&#x27;file&#x27;</span>, <span class="string">&#x27;range&#x27;</span>, <span class="string">&#x27;select&#x27;</span>, <span class="string">&#x27;radio&#x27;</span>, <span class="string">&#x27;checkbox&#x27;</span>, <span class="string">&#x27;textarea&#x27;</span>];</span><br><span class="line"><span class="keyword">var</span> renderInput = <span class="keyword">function</span> <span class="title function_">renderInput</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> content = <span class="title function_">getContent</span>();</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(instance);</span><br><span class="line">  <span class="keyword">var</span> rerender = !innerParams || params.<span class="property">input</span> !== innerParams.<span class="property">input</span>;</span><br><span class="line">  inputTypes.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">inputType</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> inputClass = swalClasses[inputType];</span><br><span class="line">    <span class="keyword">var</span> inputContainer = <span class="title function_">getChildByClass</span>(content, inputClass); <span class="comment">// set attributes</span></span><br><span class="line"></span><br><span class="line">    <span class="title function_">setAttributes</span>(inputType, params.<span class="property">inputAttributes</span>); <span class="comment">// set class</span></span><br><span class="line"></span><br><span class="line">    inputContainer.<span class="property">className</span> = inputClass;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (rerender) &#123;</span><br><span class="line">      <span class="title function_">hide</span>(inputContainer);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">input</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (rerender) &#123;</span><br><span class="line">      <span class="title function_">showInput</span>(params);</span><br><span class="line">    &#125; <span class="comment">// set custom class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="title function_">setCustomClass</span>(params);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> showInput = <span class="keyword">function</span> <span class="title function_">showInput</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!renderInputType[params.<span class="property">input</span>]) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">error</span>(<span class="string">&quot;Unexpected type of input! Expected \&quot;text\&quot;, \&quot;email\&quot;, \&quot;password\&quot;, \&quot;number\&quot;, \&quot;tel\&quot;, \&quot;select\&quot;, \&quot;radio\&quot;, \&quot;checkbox\&quot;, \&quot;textarea\&quot;, \&quot;file\&quot; or \&quot;url\&quot;, got \&quot;&quot;</span>.<span class="title function_">concat</span>(params.<span class="property">input</span>, <span class="string">&quot;\&quot;&quot;</span>));</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> inputContainer = <span class="title function_">getInputContainer</span>(params.<span class="property">input</span>);</span><br><span class="line">  <span class="keyword">var</span> input = renderInputType[params.<span class="property">input</span>](inputContainer, params);</span><br><span class="line">  <span class="title function_">show</span>(input); <span class="comment">// input autofocus</span></span><br><span class="line"></span><br><span class="line">  <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    <span class="title function_">focusInput</span>(input);</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> removeAttributes = <span class="keyword">function</span> <span class="title function_">removeAttributes</span>(<span class="params">input</span>) &#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; input.<span class="property">attributes</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">var</span> attrName = input.<span class="property">attributes</span>[i].<span class="property">name</span>;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (!([<span class="string">&#x27;type&#x27;</span>, <span class="string">&#x27;value&#x27;</span>, <span class="string">&#x27;style&#x27;</span>].<span class="title function_">indexOf</span>(attrName) !== -<span class="number">1</span>)) &#123;</span><br><span class="line">      input.<span class="title function_">removeAttribute</span>(attrName);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setAttributes = <span class="keyword">function</span> <span class="title function_">setAttributes</span>(<span class="params">inputType, inputAttributes</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> input = <span class="title function_">getInput</span>(<span class="title function_">getContent</span>(), inputType);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!input) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">removeAttributes</span>(input);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> attr <span class="keyword">in</span> inputAttributes) &#123;</span><br><span class="line">    <span class="comment">// Do not set a placeholder for &lt;input type=&quot;range&quot;&gt;</span></span><br><span class="line">    <span class="comment">// it&#x27;ll crash Edge, #1298</span></span><br><span class="line">    <span class="keyword">if</span> (inputType === <span class="string">&#x27;range&#x27;</span> &amp;&amp; attr === <span class="string">&#x27;placeholder&#x27;</span>) &#123;</span><br><span class="line">      <span class="keyword">continue</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    input.<span class="title function_">setAttribute</span>(attr, inputAttributes[attr]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setCustomClass = <span class="keyword">function</span> <span class="title function_">setCustomClass</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> inputContainer = <span class="title function_">getInputContainer</span>(params.<span class="property">input</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">inputClass</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(inputContainer, params.<span class="property">inputClass</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">customClass</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(inputContainer, params.<span class="property">customClass</span>.<span class="property">input</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setInputPlaceholder = <span class="keyword">function</span> <span class="title function_">setInputPlaceholder</span>(<span class="params">input, params</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!input.<span class="property">placeholder</span> || params.<span class="property">inputPlaceholder</span>) &#123;</span><br><span class="line">    input.<span class="property">placeholder</span> = params.<span class="property">inputPlaceholder</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getInputContainer = <span class="keyword">function</span> <span class="title function_">getInputContainer</span>(<span class="params">inputType</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.<span class="property">input</span>;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">getChildByClass</span>(<span class="title function_">getContent</span>(), inputClass);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderInputType = &#123;&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">text</span> = renderInputType.<span class="property">email</span> = renderInputType.<span class="property">password</span> = renderInputType.<span class="property">number</span> = renderInputType.<span class="property">tel</span> = renderInputType.<span class="property">url</span> = <span class="keyword">function</span> (<span class="params">input, params</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">inputValue</span> === <span class="string">&#x27;string&#x27;</span> || <span class="keyword">typeof</span> params.<span class="property">inputValue</span> === <span class="string">&#x27;number&#x27;</span>) &#123;</span><br><span class="line">    input.<span class="property">value</span> = params.<span class="property">inputValue</span>;</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (!<span class="title function_">isPromise</span>(params.<span class="property">inputValue</span>)) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&quot;Unexpected type of inputValue! Expected \&quot;string\&quot;, \&quot;number\&quot; or \&quot;Promise\&quot;, got \&quot;&quot;</span>.<span class="title function_">concat</span>(<span class="title function_">_typeof</span>(params.<span class="property">inputValue</span>), <span class="string">&quot;\&quot;&quot;</span>));</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">setInputPlaceholder</span>(input, params);</span><br><span class="line">  input.<span class="property">type</span> = params.<span class="property">input</span>;</span><br><span class="line">  <span class="keyword">return</span> input;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">file</span> = <span class="keyword">function</span> (<span class="params">input, params</span>) &#123;</span><br><span class="line">  <span class="title function_">setInputPlaceholder</span>(input, params);</span><br><span class="line">  <span class="keyword">return</span> input;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">range</span> = <span class="keyword">function</span> (<span class="params">range, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> rangeInput = range.<span class="title function_">querySelector</span>(<span class="string">&#x27;input&#x27;</span>);</span><br><span class="line">  <span class="keyword">var</span> rangeOutput = range.<span class="title function_">querySelector</span>(<span class="string">&#x27;output&#x27;</span>);</span><br><span class="line">  rangeInput.<span class="property">value</span> = params.<span class="property">inputValue</span>;</span><br><span class="line">  rangeInput.<span class="property">type</span> = params.<span class="property">input</span>;</span><br><span class="line">  rangeOutput.<span class="property">value</span> = params.<span class="property">inputValue</span>;</span><br><span class="line">  <span class="keyword">return</span> range;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">select</span> = <span class="keyword">function</span> (<span class="params">select, params</span>) &#123;</span><br><span class="line">  select.<span class="property">innerHTML</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">inputPlaceholder</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> placeholder = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;option&#x27;</span>);</span><br><span class="line">    placeholder.<span class="property">innerHTML</span> = params.<span class="property">inputPlaceholder</span>;</span><br><span class="line">    placeholder.<span class="property">value</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    placeholder.<span class="property">disabled</span> = <span class="literal">true</span>;</span><br><span class="line">    placeholder.<span class="property">selected</span> = <span class="literal">true</span>;</span><br><span class="line">    select.<span class="title function_">appendChild</span>(placeholder);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> select;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">radio</span> = <span class="keyword">function</span> (<span class="params">radio</span>) &#123;</span><br><span class="line">  radio.<span class="property">innerHTML</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="keyword">return</span> radio;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">checkbox</span> = <span class="keyword">function</span> (<span class="params">checkboxContainer, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> checkbox = <span class="title function_">getInput</span>(<span class="title function_">getContent</span>(), <span class="string">&#x27;checkbox&#x27;</span>);</span><br><span class="line">  checkbox.<span class="property">value</span> = <span class="number">1</span>;</span><br><span class="line">  checkbox.<span class="property">id</span> = swalClasses.<span class="property">checkbox</span>;</span><br><span class="line">  checkbox.<span class="property">checked</span> = <span class="title class_">Boolean</span>(params.<span class="property">inputValue</span>);</span><br><span class="line">  <span class="keyword">var</span> label = checkboxContainer.<span class="title function_">querySelector</span>(<span class="string">&#x27;span&#x27;</span>);</span><br><span class="line">  label.<span class="property">innerHTML</span> = params.<span class="property">inputPlaceholder</span>;</span><br><span class="line">  <span class="keyword">return</span> checkboxContainer;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">renderInputType.<span class="property">textarea</span> = <span class="keyword">function</span> (<span class="params">textarea, params</span>) &#123;</span><br><span class="line">  textarea.<span class="property">value</span> = params.<span class="property">inputValue</span>;</span><br><span class="line">  <span class="title function_">setInputPlaceholder</span>(textarea, params);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="string">&#x27;MutationObserver&#x27;</span> <span class="keyword">in</span> <span class="variable language_">window</span>) &#123;</span><br><span class="line">    <span class="comment">// #1699</span></span><br><span class="line">    <span class="keyword">var</span> initialPopupWidth = <span class="built_in">parseInt</span>(<span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(<span class="title function_">getPopup</span>()).<span class="property">width</span>);</span><br><span class="line">    <span class="keyword">var</span> popupPadding = <span class="built_in">parseInt</span>(<span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(<span class="title function_">getPopup</span>()).<span class="property">paddingLeft</span>) + <span class="built_in">parseInt</span>(<span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(<span class="title function_">getPopup</span>()).<span class="property">paddingRight</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">var</span> outputsize = <span class="keyword">function</span> <span class="title function_">outputsize</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> contentWidth = textarea.<span class="property">offsetWidth</span> + popupPadding;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (contentWidth &gt; initialPopupWidth) &#123;</span><br><span class="line">        <span class="title function_">getPopup</span>().<span class="property">style</span>.<span class="property">width</span> = contentWidth + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="title function_">getPopup</span>().<span class="property">style</span>.<span class="property">width</span> = <span class="literal">null</span>;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">new</span> <span class="title class_">MutationObserver</span>(outputsize).<span class="title function_">observe</span>(textarea, &#123;</span><br><span class="line">      <span class="attr">attributes</span>: <span class="literal">true</span>,</span><br><span class="line">      <span class="attr">attributeFilter</span>: [<span class="string">&#x27;style&#x27;</span>]</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> textarea;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderContent = <span class="keyword">function</span> <span class="title function_">renderContent</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> content = <span class="title function_">getContent</span>().<span class="title function_">querySelector</span>(<span class="string">&#x27;#&#x27;</span> + swalClasses.<span class="property">content</span>); <span class="comment">// Content as HTML</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">html</span>) &#123;</span><br><span class="line">    <span class="title function_">parseHtmlToContainer</span>(params.<span class="property">html</span>, content);</span><br><span class="line">    <span class="title function_">show</span>(content, <span class="string">&#x27;block&#x27;</span>); <span class="comment">// Content as plain text</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (params.<span class="property">text</span>) &#123;</span><br><span class="line">    content.<span class="property">textContent</span> = params.<span class="property">text</span>;</span><br><span class="line">    <span class="title function_">show</span>(content, <span class="string">&#x27;block&#x27;</span>); <span class="comment">// No content</span></span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">hide</span>(content);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderInput</span>(instance, params); <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(<span class="title function_">getContent</span>(), params.<span class="property">customClass</span>, <span class="string">&#x27;content&#x27;</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderFooter = <span class="keyword">function</span> <span class="title function_">renderFooter</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> footer = <span class="title function_">getFooter</span>();</span><br><span class="line">  <span class="title function_">toggle</span>(footer, params.<span class="property">footer</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">footer</span>) &#123;</span><br><span class="line">    <span class="title function_">parseHtmlToContainer</span>(params.<span class="property">footer</span>, footer);</span><br><span class="line">  &#125; <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(footer, params.<span class="property">customClass</span>, <span class="string">&#x27;footer&#x27;</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderCloseButton = <span class="keyword">function</span> <span class="title function_">renderCloseButton</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> closeButton = <span class="title function_">getCloseButton</span>();</span><br><span class="line">  closeButton.<span class="property">innerHTML</span> = params.<span class="property">closeButtonHtml</span>; <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(closeButton, params.<span class="property">customClass</span>, <span class="string">&#x27;closeButton&#x27;</span>);</span><br><span class="line">  <span class="title function_">toggle</span>(closeButton, params.<span class="property">showCloseButton</span>);</span><br><span class="line">  closeButton.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-label&#x27;</span>, params.<span class="property">closeButtonAriaLabel</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderIcon = <span class="keyword">function</span> <span class="title function_">renderIcon</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(instance); <span class="comment">// if the icon with the given type already rendered,</span></span><br><span class="line">  <span class="comment">// apply the custom class without re-rendering the icon</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams &amp;&amp; params.<span class="property">type</span> === innerParams.<span class="property">type</span> &amp;&amp; <span class="title function_">getIcon</span>()) &#123;</span><br><span class="line">    <span class="title function_">applyCustomClass</span>(<span class="title function_">getIcon</span>(), params.<span class="property">customClass</span>, <span class="string">&#x27;icon&#x27;</span>);</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">hideAllIcons</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">type</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">adjustSuccessIconBackgoundColor</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title class_">Object</span>.<span class="title function_">keys</span>(iconTypes).<span class="title function_">indexOf</span>(params.<span class="property">type</span>) !== -<span class="number">1</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> icon = <span class="title function_">elementBySelector</span>(<span class="string">&quot;.&quot;</span>.<span class="title function_">concat</span>(swalClasses.<span class="property">icon</span>, <span class="string">&quot;.&quot;</span>).<span class="title function_">concat</span>(iconTypes[params.<span class="property">type</span>]));</span><br><span class="line">    <span class="title function_">show</span>(icon); <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line">    <span class="title function_">applyCustomClass</span>(icon, params.<span class="property">customClass</span>, <span class="string">&#x27;icon&#x27;</span>); <span class="comment">// Animate icon</span></span><br><span class="line"></span><br><span class="line">    <span class="title function_">toggleClass</span>(icon, <span class="string">&quot;swal2-animate-&quot;</span>.<span class="title function_">concat</span>(params.<span class="property">type</span>, <span class="string">&quot;-icon&quot;</span>), params.<span class="property">animation</span>);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">error</span>(<span class="string">&quot;Unknown type! Expected \&quot;success\&quot;, \&quot;error\&quot;, \&quot;warning\&quot;, \&quot;info\&quot; or \&quot;question\&quot;, got \&quot;&quot;</span>.<span class="title function_">concat</span>(params.<span class="property">type</span>, <span class="string">&quot;\&quot;&quot;</span>));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> hideAllIcons = <span class="keyword">function</span> <span class="title function_">hideAllIcons</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> icons = <span class="title function_">getIcons</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; icons.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="title function_">hide</span>(icons[i]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;; <span class="comment">// Adjust success icon background color to match the popup background color</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> adjustSuccessIconBackgoundColor = <span class="keyword">function</span> <span class="title function_">adjustSuccessIconBackgoundColor</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line">  <span class="keyword">var</span> popupBackgroundColor = <span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(popup).<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;background-color&#x27;</span>);</span><br><span class="line">  <span class="keyword">var</span> successIconParts = popup.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;[class^=swal2-success-circular-line], .swal2-success-fix&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; successIconParts.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    successIconParts[i].<span class="property">style</span>.<span class="property">backgroundColor</span> = popupBackgroundColor;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderImage = <span class="keyword">function</span> <span class="title function_">renderImage</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> image = <span class="title function_">getImage</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">imageUrl</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">hide</span>(image);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">show</span>(image); <span class="comment">// Src, alt</span></span><br><span class="line"></span><br><span class="line">  image.<span class="title function_">setAttribute</span>(<span class="string">&#x27;src&#x27;</span>, params.<span class="property">imageUrl</span>);</span><br><span class="line">  image.<span class="title function_">setAttribute</span>(<span class="string">&#x27;alt&#x27;</span>, params.<span class="property">imageAlt</span>); <span class="comment">// Width, height</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyNumericalStyle</span>(image, <span class="string">&#x27;width&#x27;</span>, params.<span class="property">imageWidth</span>);</span><br><span class="line">  <span class="title function_">applyNumericalStyle</span>(image, <span class="string">&#x27;height&#x27;</span>, params.<span class="property">imageHeight</span>); <span class="comment">// Class</span></span><br><span class="line"></span><br><span class="line">  image.<span class="property">className</span> = swalClasses.<span class="property">image</span>;</span><br><span class="line">  <span class="title function_">applyCustomClass</span>(image, params.<span class="property">customClass</span>, <span class="string">&#x27;image&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">imageClass</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(image, params.<span class="property">imageClass</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> createStepElement = <span class="keyword">function</span> <span class="title function_">createStepElement</span>(<span class="params">step</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> stepEl = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;li&#x27;</span>);</span><br><span class="line">  <span class="title function_">addClass</span>(stepEl, swalClasses[<span class="string">&#x27;progress-step&#x27;</span>]);</span><br><span class="line">  stepEl.<span class="property">innerHTML</span> = step;</span><br><span class="line">  <span class="keyword">return</span> stepEl;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> createLineElement = <span class="keyword">function</span> <span class="title function_">createLineElement</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> lineEl = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;li&#x27;</span>);</span><br><span class="line">  <span class="title function_">addClass</span>(lineEl, swalClasses[<span class="string">&#x27;progress-step-line&#x27;</span>]);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">progressStepsDistance</span>) &#123;</span><br><span class="line">    lineEl.<span class="property">style</span>.<span class="property">width</span> = params.<span class="property">progressStepsDistance</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> lineEl;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderProgressSteps = <span class="keyword">function</span> <span class="title function_">renderProgressSteps</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> progressStepsContainer = <span class="title function_">getProgressSteps</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">progressSteps</span> || params.<span class="property">progressSteps</span>.<span class="property">length</span> === <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">hide</span>(progressStepsContainer);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">show</span>(progressStepsContainer);</span><br><span class="line">  progressStepsContainer.<span class="property">innerHTML</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">  <span class="keyword">var</span> currentProgressStep = <span class="built_in">parseInt</span>(params.<span class="property">currentProgressStep</span> === <span class="literal">null</span> ? <span class="title class_">Swal</span>.<span class="title function_">getQueueStep</span>() : params.<span class="property">currentProgressStep</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (currentProgressStep &gt;= params.<span class="property">progressSteps</span>.<span class="property">length</span>) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&#x27;Invalid currentProgressStep parameter, it should be less than progressSteps.length &#x27;</span> + <span class="string">&#x27;(currentProgressStep like JS arrays starts from 0)&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  params.<span class="property">progressSteps</span>.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">step, index</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> stepEl = <span class="title function_">createStepElement</span>(step);</span><br><span class="line">    progressStepsContainer.<span class="title function_">appendChild</span>(stepEl);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (index === currentProgressStep) &#123;</span><br><span class="line">      <span class="title function_">addClass</span>(stepEl, swalClasses[<span class="string">&#x27;active-progress-step&#x27;</span>]);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (index !== params.<span class="property">progressSteps</span>.<span class="property">length</span> - <span class="number">1</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> lineEl = <span class="title function_">createLineElement</span>(step);</span><br><span class="line">      progressStepsContainer.<span class="title function_">appendChild</span>(lineEl);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderTitle = <span class="keyword">function</span> <span class="title function_">renderTitle</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> title = <span class="title function_">getTitle</span>();</span><br><span class="line">  <span class="title function_">toggle</span>(title, params.<span class="property">title</span> || params.<span class="property">titleText</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">title</span>) &#123;</span><br><span class="line">    <span class="title function_">parseHtmlToContainer</span>(params.<span class="property">title</span>, title);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">titleText</span>) &#123;</span><br><span class="line">    title.<span class="property">innerText</span> = params.<span class="property">titleText</span>;</span><br><span class="line">  &#125; <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(title, params.<span class="property">customClass</span>, <span class="string">&#x27;title&#x27;</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderHeader = <span class="keyword">function</span> <span class="title function_">renderHeader</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> header = <span class="title function_">getHeader</span>(); <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(header, params.<span class="property">customClass</span>, <span class="string">&#x27;header&#x27;</span>); <span class="comment">// Progress steps</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderProgressSteps</span>(instance, params); <span class="comment">// Icon</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderIcon</span>(instance, params); <span class="comment">// Image</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderImage</span>(instance, params); <span class="comment">// Title</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderTitle</span>(instance, params); <span class="comment">// Close button</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderCloseButton</span>(instance, params);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> renderPopup = <span class="keyword">function</span> <span class="title function_">renderPopup</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>(); <span class="comment">// Width</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyNumericalStyle</span>(popup, <span class="string">&#x27;width&#x27;</span>, params.<span class="property">width</span>); <span class="comment">// Padding</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyNumericalStyle</span>(popup, <span class="string">&#x27;padding&#x27;</span>, params.<span class="property">padding</span>); <span class="comment">// Background</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">background</span>) &#123;</span><br><span class="line">    popup.<span class="property">style</span>.<span class="property">background</span> = params.<span class="property">background</span>;</span><br><span class="line">  &#125; <span class="comment">// Default Class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  popup.<span class="property">className</span> = swalClasses.<span class="property">popup</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">toast</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>], swalClasses[<span class="string">&#x27;toast-shown&#x27;</span>]);</span><br><span class="line">    <span class="title function_">addClass</span>(popup, swalClasses.<span class="property">toast</span>);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(popup, swalClasses.<span class="property">modal</span>);</span><br><span class="line">  &#125; <span class="comment">// Custom class</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">applyCustomClass</span>(popup, params.<span class="property">customClass</span>, <span class="string">&#x27;popup&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">customClass</span> === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(popup, params.<span class="property">customClass</span>);</span><br><span class="line">  &#125; <span class="comment">// CSS animation</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">toggleClass</span>(popup, swalClasses.<span class="property">noanimation</span>, !params.<span class="property">animation</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> render = <span class="keyword">function</span> <span class="title function_">render</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="title function_">renderPopup</span>(instance, params);</span><br><span class="line">  <span class="title function_">renderContainer</span>(instance, params);</span><br><span class="line">  <span class="title function_">renderHeader</span>(instance, params);</span><br><span class="line">  <span class="title function_">renderContent</span>(instance, params);</span><br><span class="line">  <span class="title function_">renderActions</span>(instance, params);</span><br><span class="line">  <span class="title function_">renderFooter</span>(instance, params);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">onRender</span> === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    params.<span class="title function_">onRender</span>(<span class="title function_">getPopup</span>());</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function to determine if SweetAlert2 popup is shown</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isVisible$1 = <span class="keyword">function</span> <span class="title function_">isVisible$$1</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">isVisible</span>(<span class="title function_">getPopup</span>());</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function to click &#x27;Confirm&#x27; button</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> clickConfirm = <span class="keyword">function</span> <span class="title function_">clickConfirm</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">getConfirmButton</span>() &amp;&amp; <span class="title function_">getConfirmButton</span>().<span class="title function_">click</span>();</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function to click &#x27;Cancel&#x27; button</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> clickCancel = <span class="keyword">function</span> <span class="title function_">clickCancel</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">getCancelButton</span>() &amp;&amp; <span class="title function_">getCancelButton</span>().<span class="title function_">click</span>();</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">fire</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">Swal</span> = <span class="variable language_">this</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> _len = <span class="variable language_">arguments</span>.<span class="property">length</span>, args = <span class="keyword">new</span> <span class="title class_">Array</span>(_len), _key = <span class="number">0</span>; _key &lt; _len; _key++) &#123;</span><br><span class="line">    args[_key] = <span class="variable language_">arguments</span>[_key];</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">_construct</span>(<span class="title class_">Swal</span>, args);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Returns an extended version of `Swal` containing `params` as defaults.</span></span><br><span class="line"><span class="comment"> * Useful for reusing Swal configuration.</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * For example:</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * Before:</span></span><br><span class="line"><span class="comment"> * const textPromptOptions = &#123; input: &#x27;text&#x27;, showCancelButton: true &#125;</span></span><br><span class="line"><span class="comment"> * const &#123;value: firstName&#125; = await Swal.fire(&#123; ...textPromptOptions, title: &#x27;What is your first name?&#x27; &#125;)</span></span><br><span class="line"><span class="comment"> * const &#123;value: lastName&#125; = await Swal.fire(&#123; ...textPromptOptions, title: &#x27;What is your last name?&#x27; &#125;)</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * After:</span></span><br><span class="line"><span class="comment"> * const TextPrompt = Swal.mixin(&#123; input: &#x27;text&#x27;, showCancelButton: true &#125;)</span></span><br><span class="line"><span class="comment"> * const &#123;value: firstName&#125; = await TextPrompt(&#x27;What is your first name?&#x27;)</span></span><br><span class="line"><span class="comment"> * const &#123;value: lastName&#125; = await TextPrompt(&#x27;What is your last name?&#x27;)</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">mixinParams</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">mixin</span>(<span class="params">mixinParams</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">MixinSwal</span> =</span><br><span class="line">  <span class="comment">/*#__PURE__*/</span></span><br><span class="line">  <span class="keyword">function</span> (<span class="params">_this</span>) &#123;</span><br><span class="line">    <span class="title function_">_inherits</span>(<span class="title class_">MixinSwal</span>, _this);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">function</span> <span class="title function_">MixinSwal</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="title function_">_classCallCheck</span>(<span class="variable language_">this</span>, <span class="title class_">MixinSwal</span>);</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">_possibleConstructorReturn</span>(<span class="variable language_">this</span>, <span class="title function_">_getPrototypeOf</span>(<span class="title class_">MixinSwal</span>).<span class="title function_">apply</span>(<span class="variable language_">this</span>, <span class="variable language_">arguments</span>));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">_createClass</span>(<span class="title class_">MixinSwal</span>, [&#123;</span><br><span class="line">      <span class="attr">key</span>: <span class="string">&quot;_main&quot;</span>,</span><br><span class="line">      <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">_main</span>(<span class="params">params</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="title function_">_get</span>(<span class="title function_">_getPrototypeOf</span>(<span class="title class_">MixinSwal</span>.<span class="property"><span class="keyword">prototype</span></span>), <span class="string">&quot;_main&quot;</span>, <span class="variable language_">this</span>).<span class="title function_">call</span>(<span class="variable language_">this</span>, <span class="title function_">_extends</span>(&#123;&#125;, mixinParams, params));</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;]);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">MixinSwal</span>;</span><br><span class="line">  &#125;(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">MixinSwal</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// private global state for the queue feature</span></span><br><span class="line"><span class="keyword">var</span> currentSteps = [];</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function for chaining sweetAlert popups</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> queue = <span class="keyword">function</span> <span class="title function_">queue</span>(<span class="params">steps</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> <span class="title class_">Swal</span> = <span class="variable language_">this</span>;</span><br><span class="line">  currentSteps = steps;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> resetAndResolve = <span class="keyword">function</span> <span class="title function_">resetAndResolve</span>(<span class="params">resolve, value</span>) &#123;</span><br><span class="line">    currentSteps = [];</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;data-swal2-queue-step&#x27;</span>);</span><br><span class="line">    <span class="title function_">resolve</span>(value);</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> queueResult = [];</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span> (<span class="params">resolve</span>) &#123;</span><br><span class="line">    (<span class="keyword">function</span> <span class="title function_">step</span>(<span class="params">i, callback</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (i &lt; currentSteps.<span class="property">length</span>) &#123;</span><br><span class="line">        <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">setAttribute</span>(<span class="string">&#x27;data-swal2-queue-step&#x27;</span>, i);</span><br><span class="line">        <span class="title class_">Swal</span>.<span class="title function_">fire</span>(currentSteps[i]).<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params">result</span>) &#123;</span><br><span class="line">          <span class="keyword">if</span> (<span class="keyword">typeof</span> result.<span class="property">value</span> !== <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">            queueResult.<span class="title function_">push</span>(result.<span class="property">value</span>);</span><br><span class="line">            <span class="title function_">step</span>(i + <span class="number">1</span>, callback);</span><br><span class="line">          &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="title function_">resetAndResolve</span>(resolve, &#123;</span><br><span class="line">              <span class="attr">dismiss</span>: result.<span class="property">dismiss</span></span><br><span class="line">            &#125;);</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;);</span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="title function_">resetAndResolve</span>(resolve, &#123;</span><br><span class="line">          <span class="attr">value</span>: queueResult</span><br><span class="line">        &#125;);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;)(<span class="number">0</span>);</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function for getting the index of current popup in queue</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getQueueStep = <span class="keyword">function</span> <span class="title function_">getQueueStep</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">getAttribute</span>(<span class="string">&#x27;data-swal2-queue-step&#x27;</span>);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function for inserting a popup to the queue</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> insertQueueStep = <span class="keyword">function</span> <span class="title function_">insertQueueStep</span>(<span class="params">step, index</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (index &amp;&amp; index &lt; currentSteps.<span class="property">length</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> currentSteps.<span class="title function_">splice</span>(index, <span class="number">0</span>, step);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> currentSteps.<span class="title function_">push</span>(step);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Global function for deleting a popup from the queue</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> deleteQueueStep = <span class="keyword">function</span> <span class="title function_">deleteQueueStep</span>(<span class="params">index</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> currentSteps[index] !== <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">    currentSteps.<span class="title function_">splice</span>(index, <span class="number">1</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Show spinner instead of Confirm button and disable Cancel button</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> showLoading = <span class="keyword">function</span> <span class="title function_">showLoading</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!popup) &#123;</span><br><span class="line">    <span class="title class_">Swal</span>.<span class="title function_">fire</span>(<span class="string">&#x27;&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  popup = <span class="title function_">getPopup</span>();</span><br><span class="line">  <span class="keyword">var</span> actions = <span class="title function_">getActions</span>();</span><br><span class="line">  <span class="keyword">var</span> confirmButton = <span class="title function_">getConfirmButton</span>();</span><br><span class="line">  <span class="keyword">var</span> cancelButton = <span class="title function_">getCancelButton</span>();</span><br><span class="line">  <span class="title function_">show</span>(actions);</span><br><span class="line">  <span class="title function_">show</span>(confirmButton);</span><br><span class="line">  <span class="title function_">addClass</span>([popup, actions], swalClasses.<span class="property">loading</span>);</span><br><span class="line">  confirmButton.<span class="property">disabled</span> = <span class="literal">true</span>;</span><br><span class="line">  cancelButton.<span class="property">disabled</span> = <span class="literal">true</span>;</span><br><span class="line">  popup.<span class="title function_">setAttribute</span>(<span class="string">&#x27;data-loading&#x27;</span>, <span class="literal">true</span>);</span><br><span class="line">  popup.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-busy&#x27;</span>, <span class="literal">true</span>);</span><br><span class="line">  popup.<span class="title function_">focus</span>();</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="variable constant_">RESTORE_FOCUS_TIMEOUT</span> = <span class="number">100</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> globalState = &#123;&#125;;</span><br><span class="line"><span class="keyword">var</span> focusPreviousActiveElement = <span class="keyword">function</span> <span class="title function_">focusPreviousActiveElement</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (globalState.<span class="property">previousActiveElement</span> &amp;&amp; globalState.<span class="property">previousActiveElement</span>.<span class="property">focus</span>) &#123;</span><br><span class="line">    globalState.<span class="property">previousActiveElement</span>.<span class="title function_">focus</span>();</span><br><span class="line">    globalState.<span class="property">previousActiveElement</span> = <span class="literal">null</span>;</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">body</span>) &#123;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">focus</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;; <span class="comment">// Restore previous active (focused) element</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> restoreActiveElement = <span class="keyword">function</span> <span class="title function_">restoreActiveElement</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span> (<span class="params">resolve</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> x = <span class="variable language_">window</span>.<span class="property">scrollX</span>;</span><br><span class="line">    <span class="keyword">var</span> y = <span class="variable language_">window</span>.<span class="property">scrollY</span>;</span><br><span class="line">    globalState.<span class="property">restoreFocusTimeout</span> = <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="title function_">focusPreviousActiveElement</span>();</span><br><span class="line">      <span class="title function_">resolve</span>();</span><br><span class="line">    &#125;, <span class="variable constant_">RESTORE_FOCUS_TIMEOUT</span>); <span class="comment">// issues/900</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (<span class="keyword">typeof</span> x !== <span class="string">&#x27;undefined&#x27;</span> &amp;&amp; <span class="keyword">typeof</span> y !== <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">      <span class="comment">// IE doesn&#x27;t have scrollX/scrollY support</span></span><br><span class="line">      <span class="variable language_">window</span>.<span class="title function_">scrollTo</span>(x, y);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * If `timer` parameter is set, returns number of milliseconds of timer remained.</span></span><br><span class="line"><span class="comment"> * Otherwise, returns undefined.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getTimerLeft = <span class="keyword">function</span> <span class="title function_">getTimerLeft</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> globalState.<span class="property">timeout</span> &amp;&amp; globalState.<span class="property">timeout</span>.<span class="title function_">getTimerLeft</span>();</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Stop timer. Returns number of milliseconds of timer remained.</span></span><br><span class="line"><span class="comment"> * If `timer` parameter isn&#x27;t set, returns undefined.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> stopTimer = <span class="keyword">function</span> <span class="title function_">stopTimer</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> globalState.<span class="property">timeout</span> &amp;&amp; globalState.<span class="property">timeout</span>.<span class="title function_">stop</span>();</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Resume timer. Returns number of milliseconds of timer remained.</span></span><br><span class="line"><span class="comment"> * If `timer` parameter isn&#x27;t set, returns undefined.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> resumeTimer = <span class="keyword">function</span> <span class="title function_">resumeTimer</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> globalState.<span class="property">timeout</span> &amp;&amp; globalState.<span class="property">timeout</span>.<span class="title function_">start</span>();</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Resume timer. Returns number of milliseconds of timer remained.</span></span><br><span class="line"><span class="comment"> * If `timer` parameter isn&#x27;t set, returns undefined.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> toggleTimer = <span class="keyword">function</span> <span class="title function_">toggleTimer</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> timer = globalState.<span class="property">timeout</span>;</span><br><span class="line">  <span class="keyword">return</span> timer &amp;&amp; (timer.<span class="property">running</span> ? timer.<span class="title function_">stop</span>() : timer.<span class="title function_">start</span>());</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Increase timer. Returns number of milliseconds of an updated timer.</span></span><br><span class="line"><span class="comment"> * If `timer` parameter isn&#x27;t set, returns undefined.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> increaseTimer = <span class="keyword">function</span> <span class="title function_">increaseTimer</span>(<span class="params">n</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> globalState.<span class="property">timeout</span> &amp;&amp; globalState.<span class="property">timeout</span>.<span class="title function_">increase</span>(n);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Check if timer is running. Returns true if timer is running</span></span><br><span class="line"><span class="comment"> * or false if timer is paused or stopped.</span></span><br><span class="line"><span class="comment"> * If `timer` parameter isn&#x27;t set, returns undefined</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isTimerRunning = <span class="keyword">function</span> <span class="title function_">isTimerRunning</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> globalState.<span class="property">timeout</span> &amp;&amp; globalState.<span class="property">timeout</span>.<span class="title function_">isRunning</span>();</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> defaultParams = &#123;</span><br><span class="line">  <span class="attr">title</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">titleText</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">text</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">html</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">footer</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">type</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">toast</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">customClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">customContainerClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">target</span>: <span class="string">&#x27;body&#x27;</span>,</span><br><span class="line">  <span class="attr">backdrop</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">animation</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">heightAuto</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">allowOutsideClick</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">allowEscapeKey</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">allowEnterKey</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">stopKeydownPropagation</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">keydownListenerCapture</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">showConfirmButton</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">showCancelButton</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">preConfirm</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">confirmButtonText</span>: <span class="string">&#x27;OK&#x27;</span>,</span><br><span class="line">  <span class="attr">confirmButtonAriaLabel</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">confirmButtonColor</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">confirmButtonClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">cancelButtonText</span>: <span class="string">&#x27;Cancel&#x27;</span>,</span><br><span class="line">  <span class="attr">cancelButtonAriaLabel</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">cancelButtonColor</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">cancelButtonClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">buttonsStyling</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">reverseButtons</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">focusConfirm</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">focusCancel</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">showCloseButton</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">closeButtonHtml</span>: <span class="string">&#x27;×&#x27;</span>,</span><br><span class="line">  <span class="attr">closeButtonAriaLabel</span>: <span class="string">&#x27;Close this dialog&#x27;</span>,</span><br><span class="line">  <span class="attr">showLoaderOnConfirm</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">imageUrl</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">imageWidth</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">imageHeight</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">imageAlt</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">imageClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">timer</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">width</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">padding</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">background</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">input</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">inputPlaceholder</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">inputValue</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">inputOptions</span>: &#123;&#125;,</span><br><span class="line">  <span class="attr">inputAutoTrim</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">inputClass</span>: <span class="string">&#x27;&#x27;</span>,</span><br><span class="line">  <span class="attr">inputAttributes</span>: &#123;&#125;,</span><br><span class="line">  <span class="attr">inputValidator</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">validationMessage</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">grow</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">position</span>: <span class="string">&#x27;center&#x27;</span>,</span><br><span class="line">  <span class="attr">progressSteps</span>: [],</span><br><span class="line">  <span class="attr">currentProgressStep</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">progressStepsDistance</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">onBeforeOpen</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">onOpen</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">onRender</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">onClose</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">onAfterClose</span>: <span class="literal">null</span>,</span><br><span class="line">  <span class="attr">scrollbarPadding</span>: <span class="literal">true</span></span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> updatableParams = [<span class="string">&#x27;title&#x27;</span>, <span class="string">&#x27;titleText&#x27;</span>, <span class="string">&#x27;text&#x27;</span>, <span class="string">&#x27;html&#x27;</span>, <span class="string">&#x27;type&#x27;</span>, <span class="string">&#x27;customClass&#x27;</span>, <span class="string">&#x27;showConfirmButton&#x27;</span>, <span class="string">&#x27;showCancelButton&#x27;</span>, <span class="string">&#x27;confirmButtonText&#x27;</span>, <span class="string">&#x27;confirmButtonAriaLabel&#x27;</span>, <span class="string">&#x27;confirmButtonColor&#x27;</span>, <span class="string">&#x27;confirmButtonClass&#x27;</span>, <span class="string">&#x27;cancelButtonText&#x27;</span>, <span class="string">&#x27;cancelButtonAriaLabel&#x27;</span>, <span class="string">&#x27;cancelButtonColor&#x27;</span>, <span class="string">&#x27;cancelButtonClass&#x27;</span>, <span class="string">&#x27;buttonsStyling&#x27;</span>, <span class="string">&#x27;reverseButtons&#x27;</span>, <span class="string">&#x27;imageUrl&#x27;</span>, <span class="string">&#x27;imageWidth&#x27;</span>, <span class="string">&#x27;imageHeigth&#x27;</span>, <span class="string">&#x27;imageAlt&#x27;</span>, <span class="string">&#x27;imageClass&#x27;</span>, <span class="string">&#x27;progressSteps&#x27;</span>, <span class="string">&#x27;currentProgressStep&#x27;</span>];</span><br><span class="line"><span class="keyword">var</span> deprecatedParams = &#123;</span><br><span class="line">  <span class="attr">customContainerClass</span>: <span class="string">&#x27;customClass&#x27;</span>,</span><br><span class="line">  <span class="attr">confirmButtonClass</span>: <span class="string">&#x27;customClass&#x27;</span>,</span><br><span class="line">  <span class="attr">cancelButtonClass</span>: <span class="string">&#x27;customClass&#x27;</span>,</span><br><span class="line">  <span class="attr">imageClass</span>: <span class="string">&#x27;customClass&#x27;</span>,</span><br><span class="line">  <span class="attr">inputClass</span>: <span class="string">&#x27;customClass&#x27;</span></span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> toastIncompatibleParams = [<span class="string">&#x27;allowOutsideClick&#x27;</span>, <span class="string">&#x27;allowEnterKey&#x27;</span>, <span class="string">&#x27;backdrop&#x27;</span>, <span class="string">&#x27;focusConfirm&#x27;</span>, <span class="string">&#x27;focusCancel&#x27;</span>, <span class="string">&#x27;heightAuto&#x27;</span>, <span class="string">&#x27;keydownListenerCapture&#x27;</span>];</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Is valid parameter</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">String</span>&#125; <span class="variable">paramName</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isValidParameter = <span class="keyword">function</span> <span class="title function_">isValidParameter</span>(<span class="params">paramName</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">Object</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">hasOwnProperty</span>.<span class="title function_">call</span>(defaultParams, paramName);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Is valid parameter for Swal.update() method</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">String</span>&#125; <span class="variable">paramName</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isUpdatableParameter = <span class="keyword">function</span> <span class="title function_">isUpdatableParameter</span>(<span class="params">paramName</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> updatableParams.<span class="title function_">indexOf</span>(paramName) !== -<span class="number">1</span>;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Is deprecated parameter</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">String</span>&#125; <span class="variable">paramName</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isDeprecatedParameter = <span class="keyword">function</span> <span class="title function_">isDeprecatedParameter</span>(<span class="params">paramName</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> deprecatedParams[paramName];</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> checkIfParamIsValid = <span class="keyword">function</span> <span class="title function_">checkIfParamIsValid</span>(<span class="params">param</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!<span class="title function_">isValidParameter</span>(param)) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&quot;Unknown parameter \&quot;&quot;</span>.<span class="title function_">concat</span>(param, <span class="string">&quot;\&quot;&quot;</span>));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> checkIfToastParamIsValid = <span class="keyword">function</span> <span class="title function_">checkIfToastParamIsValid</span>(<span class="params">param</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (toastIncompatibleParams.<span class="title function_">indexOf</span>(param) !== -<span class="number">1</span>) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&quot;The parameter \&quot;&quot;</span>.<span class="title function_">concat</span>(param, <span class="string">&quot;\&quot; is incompatible with toasts&quot;</span>));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> checkIfParamIsDeprecated = <span class="keyword">function</span> <span class="title function_">checkIfParamIsDeprecated</span>(<span class="params">param</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isDeprecatedParameter</span>(param)) &#123;</span><br><span class="line">    <span class="title function_">warnAboutDepreation</span>(param, <span class="title function_">isDeprecatedParameter</span>(param));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Show relevant warnings for given params</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">params</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> showWarningsForParams = <span class="keyword">function</span> <span class="title function_">showWarningsForParams</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> param <span class="keyword">in</span> params) &#123;</span><br><span class="line">    <span class="title function_">checkIfParamIsValid</span>(param);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (params.<span class="property">toast</span>) &#123;</span><br><span class="line">      <span class="title function_">checkIfToastParamIsValid</span>(param);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">checkIfParamIsDeprecated</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> staticMethods = <span class="title class_">Object</span>.<span class="title function_">freeze</span>(&#123;</span><br><span class="line">    <span class="attr">isValidParameter</span>: isValidParameter,</span><br><span class="line">    <span class="attr">isUpdatableParameter</span>: isUpdatableParameter,</span><br><span class="line">    <span class="attr">isDeprecatedParameter</span>: isDeprecatedParameter,</span><br><span class="line">    <span class="attr">argsToParams</span>: argsToParams,</span><br><span class="line">    <span class="attr">isVisible</span>: isVisible$1,</span><br><span class="line">    <span class="attr">clickConfirm</span>: clickConfirm,</span><br><span class="line">    <span class="attr">clickCancel</span>: clickCancel,</span><br><span class="line">    <span class="attr">getContainer</span>: getContainer,</span><br><span class="line">    <span class="attr">getPopup</span>: getPopup,</span><br><span class="line">    <span class="attr">getTitle</span>: getTitle,</span><br><span class="line">    <span class="attr">getContent</span>: getContent,</span><br><span class="line">    <span class="attr">getImage</span>: getImage,</span><br><span class="line">    <span class="attr">getIcon</span>: getIcon,</span><br><span class="line">    <span class="attr">getIcons</span>: getIcons,</span><br><span class="line">    <span class="attr">getCloseButton</span>: getCloseButton,</span><br><span class="line">    <span class="attr">getActions</span>: getActions,</span><br><span class="line">    <span class="attr">getConfirmButton</span>: getConfirmButton,</span><br><span class="line">    <span class="attr">getCancelButton</span>: getCancelButton,</span><br><span class="line">    <span class="attr">getHeader</span>: getHeader,</span><br><span class="line">    <span class="attr">getFooter</span>: getFooter,</span><br><span class="line">    <span class="attr">getFocusableElements</span>: getFocusableElements,</span><br><span class="line">    <span class="attr">getValidationMessage</span>: getValidationMessage,</span><br><span class="line">    <span class="attr">isLoading</span>: isLoading,</span><br><span class="line">    <span class="attr">fire</span>: fire,</span><br><span class="line">    <span class="attr">mixin</span>: mixin,</span><br><span class="line">    <span class="attr">queue</span>: queue,</span><br><span class="line">    <span class="attr">getQueueStep</span>: getQueueStep,</span><br><span class="line">    <span class="attr">insertQueueStep</span>: insertQueueStep,</span><br><span class="line">    <span class="attr">deleteQueueStep</span>: deleteQueueStep,</span><br><span class="line">    <span class="attr">showLoading</span>: showLoading,</span><br><span class="line">    <span class="attr">enableLoading</span>: showLoading,</span><br><span class="line">    <span class="attr">getTimerLeft</span>: getTimerLeft,</span><br><span class="line">    <span class="attr">stopTimer</span>: stopTimer,</span><br><span class="line">    <span class="attr">resumeTimer</span>: resumeTimer,</span><br><span class="line">    <span class="attr">toggleTimer</span>: toggleTimer,</span><br><span class="line">    <span class="attr">increaseTimer</span>: increaseTimer,</span><br><span class="line">    <span class="attr">isTimerRunning</span>: isTimerRunning</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Enables buttons and hide loader.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">hideLoading</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!innerParams.<span class="property">showConfirmButton</span>) &#123;</span><br><span class="line">    <span class="title function_">hide</span>(domCache.<span class="property">confirmButton</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (!innerParams.<span class="property">showCancelButton</span>) &#123;</span><br><span class="line">      <span class="title function_">hide</span>(domCache.<span class="property">actions</span>);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">removeClass</span>([domCache.<span class="property">popup</span>, domCache.<span class="property">actions</span>], swalClasses.<span class="property">loading</span>);</span><br><span class="line">  domCache.<span class="property">popup</span>.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;aria-busy&#x27;</span>);</span><br><span class="line">  domCache.<span class="property">popup</span>.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;data-loading&#x27;</span>);</span><br><span class="line">  domCache.<span class="property">confirmButton</span>.<span class="property">disabled</span> = <span class="literal">false</span>;</span><br><span class="line">  domCache.<span class="property">cancelButton</span>.<span class="property">disabled</span> = <span class="literal">false</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getInput$1</span>(<span class="params">instance</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(instance || <span class="variable language_">this</span>);</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(instance || <span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!domCache) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">getInput</span>(domCache.<span class="property">content</span>, innerParams.<span class="property">input</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> fixScrollbar = <span class="keyword">function</span> <span class="title function_">fixScrollbar</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="comment">// for queues, do not do this more than once</span></span><br><span class="line">  <span class="keyword">if</span> (states.<span class="property">previousBodyPadding</span> !== <span class="literal">null</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125; <span class="comment">// if the body has overflow</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">scrollHeight</span> &gt; <span class="variable language_">window</span>.<span class="property">innerHeight</span>) &#123;</span><br><span class="line">    <span class="comment">// add padding so the content doesn&#x27;t shift after removal of scrollbar</span></span><br><span class="line">    states.<span class="property">previousBodyPadding</span> = <span class="built_in">parseInt</span>(<span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(<span class="variable language_">document</span>.<span class="property">body</span>).<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;padding-right&#x27;</span>));</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">style</span>.<span class="property">paddingRight</span> = states.<span class="property">previousBodyPadding</span> + <span class="title function_">measureScrollbar</span>() + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> undoScrollbar = <span class="keyword">function</span> <span class="title function_">undoScrollbar</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (states.<span class="property">previousBodyPadding</span> !== <span class="literal">null</span>) &#123;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">style</span>.<span class="property">paddingRight</span> = states.<span class="property">previousBodyPadding</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">    states.<span class="property">previousBodyPadding</span> = <span class="literal">null</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* istanbul ignore next */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> iOSfix = <span class="keyword">function</span> <span class="title function_">iOSfix</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> iOS = <span class="regexp">/iPad|iPhone|iPod/</span>.<span class="title function_">test</span>(navigator.<span class="property">userAgent</span>) &amp;&amp; !<span class="variable language_">window</span>.<span class="property">MSStream</span> || navigator.<span class="property">platform</span> === <span class="string">&#x27;MacIntel&#x27;</span> &amp;&amp; navigator.<span class="property">maxTouchPoints</span> &gt; <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (iOS &amp;&amp; !<span class="title function_">hasClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses.<span class="property">iosfix</span>)) &#123;</span><br><span class="line">    <span class="keyword">var</span> offset = <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">scrollTop</span>;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">style</span>.<span class="property">top</span> = offset * -<span class="number">1</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">    <span class="title function_">addClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses.<span class="property">iosfix</span>);</span><br><span class="line">    <span class="title function_">lockBodyScroll</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> lockBodyScroll = <span class="keyword">function</span> <span class="title function_">lockBodyScroll</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="comment">// #1246</span></span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>();</span><br><span class="line">  <span class="keyword">var</span> preventTouchMove;</span><br><span class="line"></span><br><span class="line">  container.<span class="property">ontouchstart</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    preventTouchMove = e.<span class="property">target</span> === container || !<span class="title function_">isScrollable</span>(container) &amp;&amp; e.<span class="property">target</span>.<span class="property">tagName</span> !== <span class="string">&#x27;INPUT&#x27;</span> <span class="comment">// #1603</span></span><br><span class="line">    ;</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  container.<span class="property">ontouchmove</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (preventTouchMove) &#123;</span><br><span class="line">      e.<span class="title function_">preventDefault</span>();</span><br><span class="line">      e.<span class="title function_">stopPropagation</span>();</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/* istanbul ignore next */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> undoIOSfix = <span class="keyword">function</span> <span class="title function_">undoIOSfix</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">hasClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses.<span class="property">iosfix</span>)) &#123;</span><br><span class="line">    <span class="keyword">var</span> offset = <span class="built_in">parseInt</span>(<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">style</span>.<span class="property">top</span>, <span class="number">10</span>);</span><br><span class="line">    <span class="title function_">removeClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses.<span class="property">iosfix</span>);</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">style</span>.<span class="property">top</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">scrollTop</span> = offset * -<span class="number">1</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> isIE11 = <span class="keyword">function</span> <span class="title function_">isIE11</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> !!<span class="variable language_">window</span>.<span class="property">MSInputMethodContext</span> &amp;&amp; !!<span class="variable language_">document</span>.<span class="property">documentMode</span>;</span><br><span class="line">&#125;; <span class="comment">// Fix IE11 centering sweetalert2/issues/933</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/* istanbul ignore next */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> fixVerticalPositionIE = <span class="keyword">function</span> <span class="title function_">fixVerticalPositionIE</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>();</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line">  container.<span class="property">style</span>.<span class="title function_">removeProperty</span>(<span class="string">&#x27;align-items&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (popup.<span class="property">offsetTop</span> &lt; <span class="number">0</span>) &#123;</span><br><span class="line">    container.<span class="property">style</span>.<span class="property">alignItems</span> = <span class="string">&#x27;flex-start&#x27;</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/* istanbul ignore next */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="title class_">IEfix</span> = <span class="keyword">function</span> <span class="title function_">IEfix</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="variable language_">window</span> !== <span class="string">&#x27;undefined&#x27;</span> &amp;&amp; <span class="title function_">isIE11</span>()) &#123;</span><br><span class="line">    <span class="title function_">fixVerticalPositionIE</span>();</span><br><span class="line">    <span class="variable language_">window</span>.<span class="title function_">addEventListener</span>(<span class="string">&#x27;resize&#x27;</span>, fixVerticalPositionIE);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/* istanbul ignore next */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> undoIEfix = <span class="keyword">function</span> <span class="title function_">undoIEfix</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="variable language_">window</span> !== <span class="string">&#x27;undefined&#x27;</span> &amp;&amp; <span class="title function_">isIE11</span>()) &#123;</span><br><span class="line">    <span class="variable language_">window</span>.<span class="title function_">removeEventListener</span>(<span class="string">&#x27;resize&#x27;</span>, fixVerticalPositionIE);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">// Adding aria-hidden=&quot;true&quot; to elements outside of the active modal dialog ensures that</span></span><br><span class="line"><span class="comment">// elements not within the active modal dialog will not be surfaced if a user opens a screen</span></span><br><span class="line"><span class="comment">// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setAriaHidden = <span class="keyword">function</span> <span class="title function_">setAriaHidden</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> bodyChildren = <span class="title function_">toArray</span>(<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">children</span>);</span><br><span class="line">  bodyChildren.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (el === <span class="title function_">getContainer</span>() || <span class="title function_">contains</span>(el, <span class="title function_">getContainer</span>())) &#123;</span><br><span class="line">      <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (el.<span class="title function_">hasAttribute</span>(<span class="string">&#x27;aria-hidden&#x27;</span>)) &#123;</span><br><span class="line">      el.<span class="title function_">setAttribute</span>(<span class="string">&#x27;data-previous-aria-hidden&#x27;</span>, el.<span class="title function_">getAttribute</span>(<span class="string">&#x27;aria-hidden&#x27;</span>));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    el.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-hidden&#x27;</span>, <span class="string">&#x27;true&#x27;</span>);</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> unsetAriaHidden = <span class="keyword">function</span> <span class="title function_">unsetAriaHidden</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> bodyChildren = <span class="title function_">toArray</span>(<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">children</span>);</span><br><span class="line">  bodyChildren.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">el</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (el.<span class="title function_">hasAttribute</span>(<span class="string">&#x27;data-previous-aria-hidden&#x27;</span>)) &#123;</span><br><span class="line">      el.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-hidden&#x27;</span>, el.<span class="title function_">getAttribute</span>(<span class="string">&#x27;data-previous-aria-hidden&#x27;</span>));</span><br><span class="line">      el.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;data-previous-aria-hidden&#x27;</span>);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      el.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;aria-hidden&#x27;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * This module containts `WeakMap`s for each effectively-&quot;private  property&quot; that a `Swal` has.</span></span><br><span class="line"><span class="comment"> * For example, to set the private property &quot;foo&quot; of `this` to &quot;bar&quot;, you can `privateProps.foo.set(this, &#x27;bar&#x27;)`</span></span><br><span class="line"><span class="comment"> * This is the approach that Babel will probably take to implement private methods/fields</span></span><br><span class="line"><span class="comment"> *   https://github.com/tc39/proposal-private-methods</span></span><br><span class="line"><span class="comment"> *   https://github.com/babel/babel/pull/7555</span></span><br><span class="line"><span class="comment"> * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*</span></span><br><span class="line"><span class="comment"> *   then we can use that language feature.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">var</span> privateMethods = &#123;</span><br><span class="line">  <span class="attr">swalPromiseResolve</span>: <span class="keyword">new</span> <span class="title class_">WeakMap</span>()</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Instance method to close sweetAlert</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">removePopupAndResetState</span>(<span class="params">instance, container, isToast, onAfterClose</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (isToast) &#123;</span><br><span class="line">    <span class="title function_">triggerOnAfterCloseAndDispose</span>(instance, onAfterClose);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">restoreActiveElement</span>().<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">triggerOnAfterCloseAndDispose</span>(instance, onAfterClose);</span><br><span class="line">    &#125;);</span><br><span class="line">    globalState.<span class="property">keydownTarget</span>.<span class="title function_">removeEventListener</span>(<span class="string">&#x27;keydown&#x27;</span>, globalState.<span class="property">keydownHandler</span>, &#123;</span><br><span class="line">      <span class="attr">capture</span>: globalState.<span class="property">keydownListenerCapture</span></span><br><span class="line">    &#125;);</span><br><span class="line">    globalState.<span class="property">keydownHandlerAdded</span> = <span class="literal">false</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (container.<span class="property">parentNode</span>) &#123;</span><br><span class="line">    container.<span class="property">parentNode</span>.<span class="title function_">removeChild</span>(container);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isModal</span>()) &#123;</span><br><span class="line">    <span class="title function_">undoScrollbar</span>();</span><br><span class="line">    <span class="title function_">undoIOSfix</span>();</span><br><span class="line">    <span class="title function_">undoIEfix</span>();</span><br><span class="line">    <span class="title function_">unsetAriaHidden</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">removeBodyClasses</span>();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">removeBodyClasses</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">removeClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>], [swalClasses.<span class="property">shown</span>, swalClasses[<span class="string">&#x27;height-auto&#x27;</span>], swalClasses[<span class="string">&#x27;no-backdrop&#x27;</span>], swalClasses[<span class="string">&#x27;toast-shown&#x27;</span>], swalClasses[<span class="string">&#x27;toast-column&#x27;</span>]]);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">disposeSwal</span>(<span class="params">instance</span>) &#123;</span><br><span class="line">  <span class="comment">// Unset this.params so GC will dispose it (#1569)</span></span><br><span class="line">  <span class="keyword">delete</span> instance.<span class="property">params</span>; <span class="comment">// Unset globalState props so GC will dispose globalState (#1569)</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">delete</span> globalState.<span class="property">keydownHandler</span>;</span><br><span class="line">  <span class="keyword">delete</span> globalState.<span class="property">keydownTarget</span>; <span class="comment">// Unset WeakMaps so GC will be able to dispose them (#1569)</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">unsetWeakMaps</span>(privateProps);</span><br><span class="line">  <span class="title function_">unsetWeakMaps</span>(privateMethods);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">close</span>(<span class="params">resolveValue</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!popup || <span class="title function_">hasClass</span>(popup, swalClasses.<span class="property">hide</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!innerParams) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> swalPromiseResolve = privateMethods.<span class="property">swalPromiseResolve</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="title function_">removeClass</span>(popup, swalClasses.<span class="property">show</span>);</span><br><span class="line">  <span class="title function_">addClass</span>(popup, swalClasses.<span class="property">hide</span>);</span><br><span class="line">  <span class="title function_">handlePopupAnimation</span>(<span class="variable language_">this</span>, popup, innerParams); <span class="comment">// Resolve Swal promise</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">swalPromiseResolve</span>(resolveValue || &#123;&#125;);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handlePopupAnimation = <span class="keyword">function</span> <span class="title function_">handlePopupAnimation</span>(<span class="params">instance, popup, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>(); <span class="comment">// If animation is supported, animate</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> animationIsSupported = animationEndEvent &amp;&amp; <span class="title function_">hasCssAnimation</span>(popup);</span><br><span class="line">  <span class="keyword">var</span> onClose = innerParams.<span class="property">onClose</span>,</span><br><span class="line">      onAfterClose = innerParams.<span class="property">onAfterClose</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (onClose !== <span class="literal">null</span> &amp;&amp; <span class="keyword">typeof</span> onClose === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">onClose</span>(popup);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (animationIsSupported) &#123;</span><br><span class="line">    <span class="title function_">animatePopup</span>(instance, popup, container, onAfterClose);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="comment">// Otherwise, remove immediately</span></span><br><span class="line">    <span class="title function_">removePopupAndResetState</span>(instance, container, <span class="title function_">isToast</span>(), onAfterClose);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> animatePopup = <span class="keyword">function</span> <span class="title function_">animatePopup</span>(<span class="params">instance, popup, container, onAfterClose</span>) &#123;</span><br><span class="line">  globalState.<span class="property">swalCloseEventFinishedCallback</span> = removePopupAndResetState.<span class="title function_">bind</span>(<span class="literal">null</span>, instance, container, <span class="title function_">isToast</span>(), onAfterClose);</span><br><span class="line">  popup.<span class="title function_">addEventListener</span>(animationEndEvent, <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (e.<span class="property">target</span> === popup) &#123;</span><br><span class="line">      globalState.<span class="title function_">swalCloseEventFinishedCallback</span>();</span><br><span class="line">      <span class="keyword">delete</span> globalState.<span class="property">swalCloseEventFinishedCallback</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> unsetWeakMaps = <span class="keyword">function</span> <span class="title function_">unsetWeakMaps</span>(<span class="params">obj</span>) &#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i <span class="keyword">in</span> obj) &#123;</span><br><span class="line">    obj[i] = <span class="keyword">new</span> <span class="title class_">WeakMap</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> triggerOnAfterCloseAndDispose = <span class="keyword">function</span> <span class="title function_">triggerOnAfterCloseAndDispose</span>(<span class="params">instance, onAfterClose</span>) &#123;</span><br><span class="line">  <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (onAfterClose !== <span class="literal">null</span> &amp;&amp; <span class="keyword">typeof</span> onAfterClose === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">      <span class="title function_">onAfterClose</span>();</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (!<span class="title function_">getPopup</span>()) &#123;</span><br><span class="line">      <span class="title function_">disposeSwal</span>(instance);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">setButtonsDisabled</span>(<span class="params">instance, buttons, disabled</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(instance);</span><br><span class="line">  buttons.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">button</span>) &#123;</span><br><span class="line">    domCache[button].<span class="property">disabled</span> = disabled;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">setInputDisabled</span>(<span class="params">input, disabled</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (!input) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (input.<span class="property">type</span> === <span class="string">&#x27;radio&#x27;</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> radiosContainer = input.<span class="property">parentNode</span>.<span class="property">parentNode</span>;</span><br><span class="line">    <span class="keyword">var</span> radios = radiosContainer.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;input&#x27;</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; radios.<span class="property">length</span>; i++) &#123;</span><br><span class="line">      radios[i].<span class="property">disabled</span> = disabled;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    input.<span class="property">disabled</span> = disabled;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">enableButtons</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">setButtonsDisabled</span>(<span class="variable language_">this</span>, [<span class="string">&#x27;confirmButton&#x27;</span>, <span class="string">&#x27;cancelButton&#x27;</span>], <span class="literal">false</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">disableButtons</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">setButtonsDisabled</span>(<span class="variable language_">this</span>, [<span class="string">&#x27;confirmButton&#x27;</span>, <span class="string">&#x27;cancelButton&#x27;</span>], <span class="literal">true</span>);</span><br><span class="line">&#125; <span class="comment">// @deprecated</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">enableConfirmButton</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">warnAboutDepreation</span>(<span class="string">&#x27;Swal.enableConfirmButton()&#x27;</span>, <span class="string">&quot;Swal.getConfirmButton().removeAttribute(&#x27;disabled&#x27;)&quot;</span>);</span><br><span class="line">  <span class="title function_">setButtonsDisabled</span>(<span class="variable language_">this</span>, [<span class="string">&#x27;confirmButton&#x27;</span>], <span class="literal">false</span>);</span><br><span class="line">&#125; <span class="comment">// @deprecated</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">disableConfirmButton</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">warnAboutDepreation</span>(<span class="string">&#x27;Swal.disableConfirmButton()&#x27;</span>, <span class="string">&quot;Swal.getConfirmButton().setAttribute(&#x27;disabled&#x27;, &#x27;&#x27;)&quot;</span>);</span><br><span class="line">  <span class="title function_">setButtonsDisabled</span>(<span class="variable language_">this</span>, [<span class="string">&#x27;confirmButton&#x27;</span>], <span class="literal">true</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">enableInput</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">setInputDisabled</span>(<span class="variable language_">this</span>.<span class="title function_">getInput</span>(), <span class="literal">false</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">disableInput</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">setInputDisabled</span>(<span class="variable language_">this</span>.<span class="title function_">getInput</span>(), <span class="literal">true</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">showValidationMessage</span>(<span class="params">error</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  domCache.<span class="property">validationMessage</span>.<span class="property">innerHTML</span> = error;</span><br><span class="line">  <span class="keyword">var</span> popupComputedStyle = <span class="variable language_">window</span>.<span class="title function_">getComputedStyle</span>(domCache.<span class="property">popup</span>);</span><br><span class="line">  domCache.<span class="property">validationMessage</span>.<span class="property">style</span>.<span class="property">marginLeft</span> = <span class="string">&quot;-&quot;</span>.<span class="title function_">concat</span>(popupComputedStyle.<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;padding-left&#x27;</span>));</span><br><span class="line">  domCache.<span class="property">validationMessage</span>.<span class="property">style</span>.<span class="property">marginRight</span> = <span class="string">&quot;-&quot;</span>.<span class="title function_">concat</span>(popupComputedStyle.<span class="title function_">getPropertyValue</span>(<span class="string">&#x27;padding-right&#x27;</span>));</span><br><span class="line">  <span class="title function_">show</span>(domCache.<span class="property">validationMessage</span>);</span><br><span class="line">  <span class="keyword">var</span> input = <span class="variable language_">this</span>.<span class="title function_">getInput</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (input) &#123;</span><br><span class="line">    input.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-invalid&#x27;</span>, <span class="literal">true</span>);</span><br><span class="line">    input.<span class="title function_">setAttribute</span>(<span class="string">&#x27;aria-describedBy&#x27;</span>, swalClasses[<span class="string">&#x27;validation-message&#x27;</span>]);</span><br><span class="line">    <span class="title function_">focusInput</span>(input);</span><br><span class="line">    <span class="title function_">addClass</span>(input, swalClasses.<span class="property">inputerror</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125; <span class="comment">// Hide block with validation message</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">resetValidationMessage$1</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (domCache.<span class="property">validationMessage</span>) &#123;</span><br><span class="line">    <span class="title function_">hide</span>(domCache.<span class="property">validationMessage</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> input = <span class="variable language_">this</span>.<span class="title function_">getInput</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (input) &#123;</span><br><span class="line">    input.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;aria-invalid&#x27;</span>);</span><br><span class="line">    input.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;aria-describedBy&#x27;</span>);</span><br><span class="line">    <span class="title function_">removeClass</span>(input, swalClasses.<span class="property">inputerror</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getProgressSteps$1</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="title function_">warnAboutDepreation</span>(<span class="string">&#x27;Swal.getProgressSteps()&#x27;</span>, <span class="string">&quot;const swalInstance = Swal.fire(&#123;progressSteps: [&#x27;1&#x27;, &#x27;2&#x27;, &#x27;3&#x27;]&#125;); const progressSteps = swalInstance.params.progressSteps&quot;</span>);</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="keyword">return</span> innerParams.<span class="property">progressSteps</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">setProgressSteps</span>(<span class="params">progressSteps</span>) &#123;</span><br><span class="line">  <span class="title function_">warnAboutDepreation</span>(<span class="string">&#x27;Swal.setProgressSteps()&#x27;</span>, <span class="string">&#x27;Swal.update()&#x27;</span>);</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> updatedParams = <span class="title function_">_extends</span>(&#123;&#125;, innerParams, &#123;</span><br><span class="line">    <span class="attr">progressSteps</span>: progressSteps</span><br><span class="line">  &#125;);</span><br><span class="line"></span><br><span class="line">  <span class="title function_">renderProgressSteps</span>(<span class="variable language_">this</span>, updatedParams);</span><br><span class="line">  privateProps.<span class="property">innerParams</span>.<span class="title function_">set</span>(<span class="variable language_">this</span>, updatedParams);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">showProgressSteps</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="title function_">show</span>(domCache.<span class="property">progressSteps</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">hideProgressSteps</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = privateProps.<span class="property">domCache</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="title function_">hide</span>(domCache.<span class="property">progressSteps</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="title class_">Timer</span> =</span><br><span class="line"><span class="comment">/*#__PURE__*/</span></span><br><span class="line"><span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">Timer</span>(<span class="params">callback, delay</span>) &#123;</span><br><span class="line">    <span class="title function_">_classCallCheck</span>(<span class="variable language_">this</span>, <span class="title class_">Timer</span>);</span><br><span class="line"></span><br><span class="line">    <span class="variable language_">this</span>.<span class="property">callback</span> = callback;</span><br><span class="line">    <span class="variable language_">this</span>.<span class="property">remaining</span> = delay;</span><br><span class="line">    <span class="variable language_">this</span>.<span class="property">running</span> = <span class="literal">false</span>;</span><br><span class="line">    <span class="variable language_">this</span>.<span class="title function_">start</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">_createClass</span>(<span class="title class_">Timer</span>, [&#123;</span><br><span class="line">    <span class="attr">key</span>: <span class="string">&quot;start&quot;</span>,</span><br><span class="line">    <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">start</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (!<span class="variable language_">this</span>.<span class="property">running</span>) &#123;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="property">running</span> = <span class="literal">true</span>;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="property">started</span> = <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line">        <span class="variable language_">this</span>.<span class="property">id</span> = <span class="built_in">setTimeout</span>(<span class="variable language_">this</span>.<span class="property">callback</span>, <span class="variable language_">this</span>.<span class="property">remaining</span>);</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">remaining</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;, &#123;</span><br><span class="line">    <span class="attr">key</span>: <span class="string">&quot;stop&quot;</span>,</span><br><span class="line">    <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">stop</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">running</span>) &#123;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="property">running</span> = <span class="literal">false</span>;</span><br><span class="line">        <span class="built_in">clearTimeout</span>(<span class="variable language_">this</span>.<span class="property">id</span>);</span><br><span class="line">        <span class="variable language_">this</span>.<span class="property">remaining</span> -= <span class="keyword">new</span> <span class="title class_">Date</span>() - <span class="variable language_">this</span>.<span class="property">started</span>;</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">remaining</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;, &#123;</span><br><span class="line">    <span class="attr">key</span>: <span class="string">&quot;increase&quot;</span>,</span><br><span class="line">    <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">increase</span>(<span class="params">n</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> running = <span class="variable language_">this</span>.<span class="property">running</span>;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (running) &#123;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="title function_">stop</span>();</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="variable language_">this</span>.<span class="property">remaining</span> += n;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (running) &#123;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="title function_">start</span>();</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">remaining</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;, &#123;</span><br><span class="line">    <span class="attr">key</span>: <span class="string">&quot;getTimerLeft&quot;</span>,</span><br><span class="line">    <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">getTimerLeft</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">running</span>) &#123;</span><br><span class="line">        <span class="variable language_">this</span>.<span class="title function_">stop</span>();</span><br><span class="line">        <span class="variable language_">this</span>.<span class="title function_">start</span>();</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">remaining</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;, &#123;</span><br><span class="line">    <span class="attr">key</span>: <span class="string">&quot;isRunning&quot;</span>,</span><br><span class="line">    <span class="attr">value</span>: <span class="keyword">function</span> <span class="title function_">isRunning</span>(<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">running</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;]);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> <span class="title class_">Timer</span>;</span><br><span class="line">&#125;();</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> defaultInputValidators = &#123;</span><br><span class="line">  <span class="attr">email</span>: <span class="keyword">function</span> <span class="title function_">email</span>(<span class="params">string, validationMessage</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="regexp">/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]&#123;2,24&#125;$/</span>.<span class="title function_">test</span>(string) ? <span class="title class_">Promise</span>.<span class="title function_">resolve</span>() : <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(validationMessage || <span class="string">&#x27;Invalid email address&#x27;</span>);</span><br><span class="line">  &#125;,</span><br><span class="line">  <span class="attr">url</span>: <span class="keyword">function</span> <span class="title function_">url</span>(<span class="params">string, validationMessage</span>) &#123;</span><br><span class="line">    <span class="comment">// taken from https://stackoverflow.com/a/3809435 with a small change from #1306</span></span><br><span class="line">    <span class="keyword">return</span> <span class="regexp">/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]&#123;2,256&#125;\.[a-z]&#123;2,63&#125;\b([-a-zA-Z0-9@:%_+.~#?&amp;/=]*)$/</span>.<span class="title function_">test</span>(string) ? <span class="title class_">Promise</span>.<span class="title function_">resolve</span>() : <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(validationMessage || <span class="string">&#x27;Invalid URL&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">setDefaultInputValidators</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="comment">// Use default `inputValidator` for supported input types if not provided</span></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">inputValidator</span>) &#123;</span><br><span class="line">    <span class="title class_">Object</span>.<span class="title function_">keys</span>(defaultInputValidators).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">key</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (params.<span class="property">input</span> === key) &#123;</span><br><span class="line">        params.<span class="property">inputValidator</span> = defaultInputValidators[key];</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">validateCustomTargetElement</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="comment">// Determine if the custom target element is valid</span></span><br><span class="line">  <span class="keyword">if</span> (!params.<span class="property">target</span> || <span class="keyword">typeof</span> params.<span class="property">target</span> === <span class="string">&#x27;string&#x27;</span> &amp;&amp; !<span class="variable language_">document</span>.<span class="title function_">querySelector</span>(params.<span class="property">target</span>) || <span class="keyword">typeof</span> params.<span class="property">target</span> !== <span class="string">&#x27;string&#x27;</span> &amp;&amp; !params.<span class="property">target</span>.<span class="property">appendChild</span>) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&#x27;Target parameter is not valid, defaulting to &quot;body&quot;&#x27;</span>);</span><br><span class="line">    params.<span class="property">target</span> = <span class="string">&#x27;body&#x27;</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Set type, text and actions on popup</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">params</span></span></span><br><span class="line"><span class="comment"> * <span class="doctag">@returns</span> &#123;<span class="type">boolean</span>&#125;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">setParameters</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="title function_">setDefaultInputValidators</span>(params); <span class="comment">// showLoaderOnConfirm &amp;&amp; preConfirm</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">showLoaderOnConfirm</span> &amp;&amp; !params.<span class="property">preConfirm</span>) &#123;</span><br><span class="line">    <span class="title function_">warn</span>(<span class="string">&#x27;showLoaderOnConfirm is set to true, but preConfirm is not defined.\n&#x27;</span> + <span class="string">&#x27;showLoaderOnConfirm should be used together with preConfirm, see usage example:\n&#x27;</span> + <span class="string">&#x27;https://sweetalert2.github.io/#ajax-request&#x27;</span>);</span><br><span class="line">  &#125; <span class="comment">// params.animation will be actually used in renderPopup.js</span></span><br><span class="line">  <span class="comment">// but in case when params.animation is a function, we need to call that function</span></span><br><span class="line">  <span class="comment">// before popup (re)initialization, so it&#x27;ll be possible to check Swal.isVisible()</span></span><br><span class="line">  <span class="comment">// inside the params.animation function</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  params.<span class="property">animation</span> = <span class="title function_">callIfFunction</span>(params.<span class="property">animation</span>);</span><br><span class="line">  <span class="title function_">validateCustomTargetElement</span>(params); <span class="comment">// Replace newlines with &lt;br&gt; in title</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">title</span> === <span class="string">&#x27;string&#x27;</span>) &#123;</span><br><span class="line">    params.<span class="property">title</span> = params.<span class="property">title</span>.<span class="title function_">split</span>(<span class="string">&#x27;\n&#x27;</span>).<span class="title function_">join</span>(<span class="string">&#x27;&lt;br /&gt;&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">init</span>(params);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">swalOpenAnimationFinished</span>(<span class="params">popup, container</span>) &#123;</span><br><span class="line">  popup.<span class="title function_">removeEventListener</span>(animationEndEvent, swalOpenAnimationFinished);</span><br><span class="line">  container.<span class="property">style</span>.<span class="property">overflowY</span> = <span class="string">&#x27;auto&#x27;</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Open popup, add necessary classes and styles, fix scrollbar</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">Array</span>&#125; <span class="variable">params</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> openPopup = <span class="keyword">function</span> <span class="title function_">openPopup</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> container = <span class="title function_">getContainer</span>();</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">onBeforeOpen</span> === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    params.<span class="title function_">onBeforeOpen</span>(popup);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">addClasses</span>(container, popup, params); <span class="comment">// scrolling is &#x27;hidden&#x27; until animation is done, after that &#x27;auto&#x27;</span></span><br><span class="line"></span><br><span class="line">  <span class="title function_">setScrollingVisibility</span>(container, popup);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isModal</span>()) &#123;</span><br><span class="line">    <span class="title function_">fixScrollContainer</span>(container, params.<span class="property">scrollbarPadding</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!<span class="title function_">isToast</span>() &amp;&amp; !globalState.<span class="property">previousActiveElement</span>) &#123;</span><br><span class="line">    globalState.<span class="property">previousActiveElement</span> = <span class="variable language_">document</span>.<span class="property">activeElement</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> params.<span class="property">onOpen</span> === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> params.<span class="title function_">onOpen</span>(popup);</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setScrollingVisibility = <span class="keyword">function</span> <span class="title function_">setScrollingVisibility</span>(<span class="params">container, popup</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (animationEndEvent &amp;&amp; <span class="title function_">hasCssAnimation</span>(popup)) &#123;</span><br><span class="line">    container.<span class="property">style</span>.<span class="property">overflowY</span> = <span class="string">&#x27;hidden&#x27;</span>;</span><br><span class="line">    popup.<span class="title function_">addEventListener</span>(animationEndEvent, swalOpenAnimationFinished.<span class="title function_">bind</span>(<span class="literal">null</span>, popup, container));</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    container.<span class="property">style</span>.<span class="property">overflowY</span> = <span class="string">&#x27;auto&#x27;</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> fixScrollContainer = <span class="keyword">function</span> <span class="title function_">fixScrollContainer</span>(<span class="params">container, scrollbarPadding</span>) &#123;</span><br><span class="line">  <span class="title function_">iOSfix</span>();</span><br><span class="line">  <span class="title class_">IEfix</span>();</span><br><span class="line">  <span class="title function_">setAriaHidden</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (scrollbarPadding) &#123;</span><br><span class="line">    <span class="title function_">fixScrollbar</span>();</span><br><span class="line">  &#125; <span class="comment">// sweetalert2/issues/1247</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="built_in">setTimeout</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    container.<span class="property">scrollTop</span> = <span class="number">0</span>;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> addClasses = <span class="keyword">function</span> <span class="title function_">addClasses</span>(<span class="params">container, popup, params</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">animation</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>(popup, swalClasses.<span class="property">show</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">show</span>(popup);</span><br><span class="line">  <span class="title function_">addClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>, container], swalClasses.<span class="property">shown</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">heightAuto</span> &amp;&amp; params.<span class="property">backdrop</span> &amp;&amp; !params.<span class="property">toast</span>) &#123;</span><br><span class="line">    <span class="title function_">addClass</span>([<span class="variable language_">document</span>.<span class="property">documentElement</span>, <span class="variable language_">document</span>.<span class="property">body</span>], swalClasses[<span class="string">&#x27;height-auto&#x27;</span>]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleInputOptionsAndValue = <span class="keyword">function</span> <span class="title function_">handleInputOptionsAndValue</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (params.<span class="property">input</span> === <span class="string">&#x27;select&#x27;</span> || params.<span class="property">input</span> === <span class="string">&#x27;radio&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">handleInputOptions</span>(instance, params);</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> ([<span class="string">&#x27;text&#x27;</span>, <span class="string">&#x27;email&#x27;</span>, <span class="string">&#x27;number&#x27;</span>, <span class="string">&#x27;tel&#x27;</span>, <span class="string">&#x27;textarea&#x27;</span>].<span class="title function_">indexOf</span>(params.<span class="property">input</span>) !== -<span class="number">1</span> &amp;&amp; <span class="title function_">isPromise</span>(params.<span class="property">inputValue</span>)) &#123;</span><br><span class="line">    <span class="title function_">handleInputValue</span>(instance, params);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> getInputValue = <span class="keyword">function</span> <span class="title function_">getInputValue</span>(<span class="params">instance, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> input = instance.<span class="title function_">getInput</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!input) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">switch</span> (innerParams.<span class="property">input</span>) &#123;</span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;checkbox&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">getCheckboxValue</span>(input);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;radio&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">getRadioValue</span>(input);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">case</span> <span class="string">&#x27;file&#x27;</span>:</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">getFileValue</span>(input);</span><br><span class="line"></span><br><span class="line">    <span class="attr">default</span>:</span><br><span class="line">      <span class="keyword">return</span> innerParams.<span class="property">inputAutoTrim</span> ? input.<span class="property">value</span>.<span class="title function_">trim</span>() : input.<span class="property">value</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getCheckboxValue = <span class="keyword">function</span> <span class="title function_">getCheckboxValue</span>(<span class="params">input</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> input.<span class="property">checked</span> ? <span class="number">1</span> : <span class="number">0</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getRadioValue = <span class="keyword">function</span> <span class="title function_">getRadioValue</span>(<span class="params">input</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> input.<span class="property">checked</span> ? input.<span class="property">value</span> : <span class="literal">null</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> getFileValue = <span class="keyword">function</span> <span class="title function_">getFileValue</span>(<span class="params">input</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> input.<span class="property">files</span>.<span class="property">length</span> ? input.<span class="title function_">getAttribute</span>(<span class="string">&#x27;multiple&#x27;</span>) !== <span class="literal">null</span> ? input.<span class="property">files</span> : input.<span class="property">files</span>[<span class="number">0</span>] : <span class="literal">null</span>;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleInputOptions = <span class="keyword">function</span> <span class="title function_">handleInputOptions</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> content = <span class="title function_">getContent</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> processInputOptions = <span class="keyword">function</span> <span class="title function_">processInputOptions</span>(<span class="params">inputOptions</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> populateInputOptions[params.<span class="property">input</span>](content, <span class="title function_">formatInputOptions</span>(inputOptions), params);</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">isPromise</span>(params.<span class="property">inputOptions</span>)) &#123;</span><br><span class="line">    <span class="title function_">showLoading</span>();</span><br><span class="line">    params.<span class="property">inputOptions</span>.<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params">inputOptions</span>) &#123;</span><br><span class="line">      instance.<span class="title function_">hideLoading</span>();</span><br><span class="line">      <span class="title function_">processInputOptions</span>(inputOptions);</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="title function_">_typeof</span>(params.<span class="property">inputOptions</span>) === <span class="string">&#x27;object&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">processInputOptions</span>(params.<span class="property">inputOptions</span>);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">error</span>(<span class="string">&quot;Unexpected type of inputOptions! Expected object, Map or Promise, got &quot;</span>.<span class="title function_">concat</span>(<span class="title function_">_typeof</span>(params.<span class="property">inputOptions</span>)));</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleInputValue = <span class="keyword">function</span> <span class="title function_">handleInputValue</span>(<span class="params">instance, params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> input = instance.<span class="title function_">getInput</span>();</span><br><span class="line">  <span class="title function_">hide</span>(input);</span><br><span class="line">  params.<span class="property">inputValue</span>.<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params">inputValue</span>) &#123;</span><br><span class="line">    input.<span class="property">value</span> = params.<span class="property">input</span> === <span class="string">&#x27;number&#x27;</span> ? <span class="built_in">parseFloat</span>(inputValue) || <span class="number">0</span> : inputValue + <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    <span class="title function_">show</span>(input);</span><br><span class="line">    input.<span class="title function_">focus</span>();</span><br><span class="line">    instance.<span class="title function_">hideLoading</span>();</span><br><span class="line">  &#125;)[<span class="string">&quot;catch&quot;</span>](<span class="keyword">function</span> (<span class="params">err</span>) &#123;</span><br><span class="line">    <span class="title function_">error</span>(<span class="string">&#x27;Error in inputValue promise: &#x27;</span> + err);</span><br><span class="line">    input.<span class="property">value</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">    <span class="title function_">show</span>(input);</span><br><span class="line">    input.<span class="title function_">focus</span>();</span><br><span class="line">    instance.<span class="title function_">hideLoading</span>();</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> populateInputOptions = &#123;</span><br><span class="line">  <span class="attr">select</span>: <span class="keyword">function</span> <span class="title function_">select</span>(<span class="params">content, inputOptions, params</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> select = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">select</span>);</span><br><span class="line">    inputOptions.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">inputOption</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> optionValue = inputOption[<span class="number">0</span>];</span><br><span class="line">      <span class="keyword">var</span> optionLabel = inputOption[<span class="number">1</span>];</span><br><span class="line">      <span class="keyword">var</span> option = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;option&#x27;</span>);</span><br><span class="line">      option.<span class="property">value</span> = optionValue;</span><br><span class="line">      option.<span class="property">innerHTML</span> = optionLabel;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (params.<span class="property">inputValue</span>.<span class="title function_">toString</span>() === optionValue.<span class="title function_">toString</span>()) &#123;</span><br><span class="line">        option.<span class="property">selected</span> = <span class="literal">true</span>;</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      select.<span class="title function_">appendChild</span>(option);</span><br><span class="line">    &#125;);</span><br><span class="line">    select.<span class="title function_">focus</span>();</span><br><span class="line">  &#125;,</span><br><span class="line">  <span class="attr">radio</span>: <span class="keyword">function</span> <span class="title function_">radio</span>(<span class="params">content, inputOptions, params</span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> radio = <span class="title function_">getChildByClass</span>(content, swalClasses.<span class="property">radio</span>);</span><br><span class="line">    inputOptions.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">inputOption</span>) &#123;</span><br><span class="line">      <span class="keyword">var</span> radioValue = inputOption[<span class="number">0</span>];</span><br><span class="line">      <span class="keyword">var</span> radioLabel = inputOption[<span class="number">1</span>];</span><br><span class="line">      <span class="keyword">var</span> radioInput = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;input&#x27;</span>);</span><br><span class="line">      <span class="keyword">var</span> radioLabelElement = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;label&#x27;</span>);</span><br><span class="line">      radioInput.<span class="property">type</span> = <span class="string">&#x27;radio&#x27;</span>;</span><br><span class="line">      radioInput.<span class="property">name</span> = swalClasses.<span class="property">radio</span>;</span><br><span class="line">      radioInput.<span class="property">value</span> = radioValue;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (params.<span class="property">inputValue</span>.<span class="title function_">toString</span>() === radioValue.<span class="title function_">toString</span>()) &#123;</span><br><span class="line">        radioInput.<span class="property">checked</span> = <span class="literal">true</span>;</span><br><span class="line">      &#125;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">var</span> label = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;span&#x27;</span>);</span><br><span class="line">      label.<span class="property">innerHTML</span> = radioLabel;</span><br><span class="line">      label.<span class="property">className</span> = swalClasses.<span class="property">label</span>;</span><br><span class="line">      radioLabelElement.<span class="title function_">appendChild</span>(radioInput);</span><br><span class="line">      radioLabelElement.<span class="title function_">appendChild</span>(label);</span><br><span class="line">      radio.<span class="title function_">appendChild</span>(radioLabelElement);</span><br><span class="line">    &#125;);</span><br><span class="line">    <span class="keyword">var</span> radios = radio.<span class="title function_">querySelectorAll</span>(<span class="string">&#x27;input&#x27;</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (radios.<span class="property">length</span>) &#123;</span><br><span class="line">      radios[<span class="number">0</span>].<span class="title function_">focus</span>();</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Converts `inputOptions` into an array of `[value, label]`s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> <span class="variable">inputOptions</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> formatInputOptions = <span class="keyword">function</span> <span class="title function_">formatInputOptions</span>(<span class="params">inputOptions</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> result = [];</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Map</span> !== <span class="string">&#x27;undefined&#x27;</span> &amp;&amp; inputOptions <span class="keyword">instanceof</span> <span class="title class_">Map</span>) &#123;</span><br><span class="line">    inputOptions.<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">value, key</span>) &#123;</span><br><span class="line">      result.<span class="title function_">push</span>([key, value]);</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title class_">Object</span>.<span class="title function_">keys</span>(inputOptions).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">key</span>) &#123;</span><br><span class="line">      result.<span class="title function_">push</span>([key, inputOptions[key]]);</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> result;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleConfirmButtonClick = <span class="keyword">function</span> <span class="title function_">handleConfirmButtonClick</span>(<span class="params">instance, innerParams</span>) &#123;</span><br><span class="line">  instance.<span class="title function_">disableButtons</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">input</span>) &#123;</span><br><span class="line">    <span class="title function_">handleConfirmWithInput</span>(instance, innerParams);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">confirm</span>(instance, innerParams, <span class="literal">true</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> handleCancelButtonClick = <span class="keyword">function</span> <span class="title function_">handleCancelButtonClick</span>(<span class="params">instance, dismissWith</span>) &#123;</span><br><span class="line">  instance.<span class="title function_">disableButtons</span>();</span><br><span class="line">  <span class="title function_">dismissWith</span>(<span class="title class_">DismissReason</span>.<span class="property">cancel</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleConfirmWithInput = <span class="keyword">function</span> <span class="title function_">handleConfirmWithInput</span>(<span class="params">instance, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> inputValue = <span class="title function_">getInputValue</span>(instance, innerParams);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">inputValidator</span>) &#123;</span><br><span class="line">    instance.<span class="title function_">disableInput</span>();</span><br><span class="line">    <span class="keyword">var</span> validationPromise = <span class="title class_">Promise</span>.<span class="title function_">resolve</span>().<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> innerParams.<span class="title function_">inputValidator</span>(inputValue, innerParams.<span class="property">validationMessage</span>);</span><br><span class="line">    &#125;);</span><br><span class="line">    validationPromise.<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params">validationMessage</span>) &#123;</span><br><span class="line">      instance.<span class="title function_">enableButtons</span>();</span><br><span class="line">      instance.<span class="title function_">enableInput</span>();</span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (validationMessage) &#123;</span><br><span class="line">        instance.<span class="title function_">showValidationMessage</span>(validationMessage);</span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="title function_">confirm</span>(instance, innerParams, inputValue);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (!instance.<span class="title function_">getInput</span>().<span class="title function_">checkValidity</span>()) &#123;</span><br><span class="line">    instance.<span class="title function_">enableButtons</span>();</span><br><span class="line">    instance.<span class="title function_">showValidationMessage</span>(innerParams.<span class="property">validationMessage</span>);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">confirm</span>(instance, innerParams, inputValue);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> succeedWith = <span class="keyword">function</span> <span class="title function_">succeedWith</span>(<span class="params">instance, value</span>) &#123;</span><br><span class="line">  instance.<span class="title function_">closePopup</span>(&#123;</span><br><span class="line">    <span class="attr">value</span>: value</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> confirm = <span class="keyword">function</span> <span class="title function_">confirm</span>(<span class="params">instance, innerParams, value</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">showLoaderOnConfirm</span>) &#123;</span><br><span class="line">    <span class="title function_">showLoading</span>(); <span class="comment">// <span class="doctag">TODO:</span> make showLoading an *instance* method</span></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">preConfirm</span>) &#123;</span><br><span class="line">    instance.<span class="title function_">resetValidationMessage</span>();</span><br><span class="line">    <span class="keyword">var</span> preConfirmPromise = <span class="title class_">Promise</span>.<span class="title function_">resolve</span>().<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> innerParams.<span class="title function_">preConfirm</span>(value, innerParams.<span class="property">validationMessage</span>);</span><br><span class="line">    &#125;);</span><br><span class="line">    preConfirmPromise.<span class="title function_">then</span>(<span class="keyword">function</span> (<span class="params">preConfirmValue</span>) &#123;</span><br><span class="line">      <span class="keyword">if</span> (<span class="title function_">isVisible</span>(<span class="title function_">getValidationMessage</span>()) || preConfirmValue === <span class="literal">false</span>) &#123;</span><br><span class="line">        instance.<span class="title function_">hideLoading</span>();</span><br><span class="line">      &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="title function_">succeedWith</span>(instance, <span class="keyword">typeof</span> preConfirmValue === <span class="string">&#x27;undefined&#x27;</span> ? value : preConfirmValue);</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="title function_">succeedWith</span>(instance, value);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> addKeydownHandler = <span class="keyword">function</span> <span class="title function_">addKeydownHandler</span>(<span class="params">instance, globalState, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (globalState.<span class="property">keydownTarget</span> &amp;&amp; globalState.<span class="property">keydownHandlerAdded</span>) &#123;</span><br><span class="line">    globalState.<span class="property">keydownTarget</span>.<span class="title function_">removeEventListener</span>(<span class="string">&#x27;keydown&#x27;</span>, globalState.<span class="property">keydownHandler</span>, &#123;</span><br><span class="line">      <span class="attr">capture</span>: globalState.<span class="property">keydownListenerCapture</span></span><br><span class="line">    &#125;);</span><br><span class="line">    globalState.<span class="property">keydownHandlerAdded</span> = <span class="literal">false</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!innerParams.<span class="property">toast</span>) &#123;</span><br><span class="line">    globalState.<span class="property">keydownHandler</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">keydownHandler</span>(instance, e, innerParams, dismissWith);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    globalState.<span class="property">keydownTarget</span> = innerParams.<span class="property">keydownListenerCapture</span> ? <span class="variable language_">window</span> : <span class="title function_">getPopup</span>();</span><br><span class="line">    globalState.<span class="property">keydownListenerCapture</span> = innerParams.<span class="property">keydownListenerCapture</span>;</span><br><span class="line">    globalState.<span class="property">keydownTarget</span>.<span class="title function_">addEventListener</span>(<span class="string">&#x27;keydown&#x27;</span>, globalState.<span class="property">keydownHandler</span>, &#123;</span><br><span class="line">      <span class="attr">capture</span>: globalState.<span class="property">keydownListenerCapture</span></span><br><span class="line">    &#125;);</span><br><span class="line">    globalState.<span class="property">keydownHandlerAdded</span> = <span class="literal">true</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;; <span class="comment">// Focus handling</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setFocus = <span class="keyword">function</span> <span class="title function_">setFocus</span>(<span class="params">innerParams, index, increment</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> focusableElements = <span class="title function_">getFocusableElements</span>(); <span class="comment">// search for visible elements and select the next possible match</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; focusableElements.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    index = index + increment; <span class="comment">// rollover to first item</span></span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (index === focusableElements.<span class="property">length</span>) &#123;</span><br><span class="line">      index = <span class="number">0</span>; <span class="comment">// go to last item</span></span><br><span class="line">    &#125; <span class="keyword">else</span> <span class="keyword">if</span> (index === -<span class="number">1</span>) &#123;</span><br><span class="line">      index = focusableElements.<span class="property">length</span> - <span class="number">1</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> focusableElements[index].<span class="title function_">focus</span>();</span><br><span class="line">  &#125; <span class="comment">// no visible focusable elements, focus the popup</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="title function_">getPopup</span>().<span class="title function_">focus</span>();</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> arrowKeys = [<span class="string">&#x27;ArrowLeft&#x27;</span>, <span class="string">&#x27;ArrowRight&#x27;</span>, <span class="string">&#x27;ArrowUp&#x27;</span>, <span class="string">&#x27;ArrowDown&#x27;</span>, <span class="string">&#x27;Left&#x27;</span>, <span class="string">&#x27;Right&#x27;</span>, <span class="string">&#x27;Up&#x27;</span>, <span class="string">&#x27;Down&#x27;</span> <span class="comment">// IE11</span></span><br><span class="line">];</span><br><span class="line"><span class="keyword">var</span> escKeys = [<span class="string">&#x27;Escape&#x27;</span>, <span class="string">&#x27;Esc&#x27;</span> <span class="comment">// IE11</span></span><br><span class="line">];</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> keydownHandler = <span class="keyword">function</span> <span class="title function_">keydownHandler</span>(<span class="params">instance, e, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">stopKeydownPropagation</span>) &#123;</span><br><span class="line">    e.<span class="title function_">stopPropagation</span>();</span><br><span class="line">  &#125; <span class="comment">// ENTER</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (e.<span class="property">key</span> === <span class="string">&#x27;Enter&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">handleEnter</span>(instance, e, innerParams); <span class="comment">// TAB</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (e.<span class="property">key</span> === <span class="string">&#x27;Tab&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">handleTab</span>(e, innerParams); <span class="comment">// ARROWS - switch focus between buttons</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (arrowKeys.<span class="title function_">indexOf</span>(e.<span class="property">key</span>) !== -<span class="number">1</span>) &#123;</span><br><span class="line">    <span class="title function_">handleArrows</span>(); <span class="comment">// ESC</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (escKeys.<span class="title function_">indexOf</span>(e.<span class="property">key</span>) !== -<span class="number">1</span>) &#123;</span><br><span class="line">    <span class="title function_">handleEsc</span>(e, innerParams, dismissWith);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleEnter = <span class="keyword">function</span> <span class="title function_">handleEnter</span>(<span class="params">instance, e, innerParams</span>) &#123;</span><br><span class="line">  <span class="comment">// #720 #721</span></span><br><span class="line">  <span class="keyword">if</span> (e.<span class="property">isComposing</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (e.<span class="property">target</span> &amp;&amp; instance.<span class="title function_">getInput</span>() &amp;&amp; e.<span class="property">target</span>.<span class="property">outerHTML</span> === instance.<span class="title function_">getInput</span>().<span class="property">outerHTML</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> ([<span class="string">&#x27;textarea&#x27;</span>, <span class="string">&#x27;file&#x27;</span>].<span class="title function_">indexOf</span>(innerParams.<span class="property">input</span>) !== -<span class="number">1</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span>; <span class="comment">// do not submit</span></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">clickConfirm</span>();</span><br><span class="line">    e.<span class="title function_">preventDefault</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleTab = <span class="keyword">function</span> <span class="title function_">handleTab</span>(<span class="params">e, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> targetElement = e.<span class="property">target</span>;</span><br><span class="line">  <span class="keyword">var</span> focusableElements = <span class="title function_">getFocusableElements</span>();</span><br><span class="line">  <span class="keyword">var</span> btnIndex = -<span class="number">1</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; focusableElements.<span class="property">length</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">if</span> (targetElement === focusableElements[i]) &#123;</span><br><span class="line">      btnIndex = i;</span><br><span class="line">      <span class="keyword">break</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!e.<span class="property">shiftKey</span>) &#123;</span><br><span class="line">    <span class="comment">// Cycle to the next button</span></span><br><span class="line">    <span class="title function_">setFocus</span>(innerParams, btnIndex, <span class="number">1</span>);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="comment">// Cycle to the prev button</span></span><br><span class="line">    <span class="title function_">setFocus</span>(innerParams, btnIndex, -<span class="number">1</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  e.<span class="title function_">stopPropagation</span>();</span><br><span class="line">  e.<span class="title function_">preventDefault</span>();</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleArrows = <span class="keyword">function</span> <span class="title function_">handleArrows</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> confirmButton = <span class="title function_">getConfirmButton</span>();</span><br><span class="line">  <span class="keyword">var</span> cancelButton = <span class="title function_">getCancelButton</span>(); <span class="comment">// focus Cancel button if Confirm button is currently focused</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">activeElement</span> === confirmButton &amp;&amp; <span class="title function_">isVisible</span>(cancelButton)) &#123;</span><br><span class="line">    cancelButton.<span class="title function_">focus</span>(); <span class="comment">// and vice versa</span></span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">activeElement</span> === cancelButton &amp;&amp; <span class="title function_">isVisible</span>(confirmButton)) &#123;</span><br><span class="line">    confirmButton.<span class="title function_">focus</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleEsc = <span class="keyword">function</span> <span class="title function_">handleEsc</span>(<span class="params">e, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">callIfFunction</span>(innerParams.<span class="property">allowEscapeKey</span>)) &#123;</span><br><span class="line">    e.<span class="title function_">preventDefault</span>();</span><br><span class="line">    <span class="title function_">dismissWith</span>(<span class="title class_">DismissReason</span>.<span class="property">esc</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handlePopupClick = <span class="keyword">function</span> <span class="title function_">handlePopupClick</span>(<span class="params">domCache, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">toast</span>) &#123;</span><br><span class="line">    <span class="title function_">handleToastClick</span>(domCache, innerParams, dismissWith);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="comment">// Ignore click events that had mousedown on the popup but mouseup on the container</span></span><br><span class="line">    <span class="comment">// This can happen when the user drags a slider</span></span><br><span class="line">    <span class="title function_">handleModalMousedown</span>(domCache); <span class="comment">// Ignore click events that had mousedown on the container but mouseup on the popup</span></span><br><span class="line"></span><br><span class="line">    <span class="title function_">handleContainerMousedown</span>(domCache);</span><br><span class="line">    <span class="title function_">handleModalClick</span>(domCache, innerParams, dismissWith);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleToastClick = <span class="keyword">function</span> <span class="title function_">handleToastClick</span>(<span class="params">domCache, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="comment">// Closing toast by internal click</span></span><br><span class="line">  domCache.<span class="property">popup</span>.<span class="property">onclick</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (innerParams.<span class="property">showConfirmButton</span> || innerParams.<span class="property">showCancelButton</span> || innerParams.<span class="property">showCloseButton</span> || innerParams.<span class="property">input</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">dismissWith</span>(<span class="title class_">DismissReason</span>.<span class="property">close</span>);</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> ignoreOutsideClick = <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleModalMousedown = <span class="keyword">function</span> <span class="title function_">handleModalMousedown</span>(<span class="params">domCache</span>) &#123;</span><br><span class="line">  domCache.<span class="property">popup</span>.<span class="property">onmousedown</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    domCache.<span class="property">container</span>.<span class="property">onmouseup</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">      domCache.<span class="property">container</span>.<span class="property">onmouseup</span> = <span class="literal">undefined</span>; <span class="comment">// We only check if the mouseup target is the container because usually it doesn&#x27;t</span></span><br><span class="line">      <span class="comment">// have any other direct children aside of the popup</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (e.<span class="property">target</span> === domCache.<span class="property">container</span>) &#123;</span><br><span class="line">        ignoreOutsideClick = <span class="literal">true</span>;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleContainerMousedown = <span class="keyword">function</span> <span class="title function_">handleContainerMousedown</span>(<span class="params">domCache</span>) &#123;</span><br><span class="line">  domCache.<span class="property">container</span>.<span class="property">onmousedown</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    domCache.<span class="property">popup</span>.<span class="property">onmouseup</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">      domCache.<span class="property">popup</span>.<span class="property">onmouseup</span> = <span class="literal">undefined</span>; <span class="comment">// We also need to check if the mouseup target is a child of the popup</span></span><br><span class="line"></span><br><span class="line">      <span class="keyword">if</span> (e.<span class="property">target</span> === domCache.<span class="property">popup</span> || domCache.<span class="property">popup</span>.<span class="title function_">contains</span>(e.<span class="property">target</span>)) &#123;</span><br><span class="line">        ignoreOutsideClick = <span class="literal">true</span>;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> handleModalClick = <span class="keyword">function</span> <span class="title function_">handleModalClick</span>(<span class="params">domCache, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  domCache.<span class="property">container</span>.<span class="property">onclick</span> = <span class="keyword">function</span> (<span class="params">e</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (ignoreOutsideClick) &#123;</span><br><span class="line">      ignoreOutsideClick = <span class="literal">false</span>;</span><br><span class="line">      <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (e.<span class="property">target</span> === domCache.<span class="property">container</span> &amp;&amp; <span class="title function_">callIfFunction</span>(innerParams.<span class="property">allowOutsideClick</span>)) &#123;</span><br><span class="line">      <span class="title function_">dismissWith</span>(<span class="title class_">DismissReason</span>.<span class="property">backdrop</span>);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">_main</span>(<span class="params">userParams</span>) &#123;</span><br><span class="line">  <span class="title function_">showWarningsForParams</span>(userParams); <span class="comment">// Check if there is another Swal closing</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="title function_">getPopup</span>() &amp;&amp; globalState.<span class="property">swalCloseEventFinishedCallback</span>) &#123;</span><br><span class="line">    globalState.<span class="title function_">swalCloseEventFinishedCallback</span>();</span><br><span class="line">    <span class="keyword">delete</span> globalState.<span class="property">swalCloseEventFinishedCallback</span>;</span><br><span class="line">  &#125; <span class="comment">// Check if there is a swal disposal defer timer</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (globalState.<span class="property">deferDisposalTimer</span>) &#123;</span><br><span class="line">    <span class="built_in">clearTimeout</span>(globalState.<span class="property">deferDisposalTimer</span>);</span><br><span class="line">    <span class="keyword">delete</span> globalState.<span class="property">deferDisposalTimer</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> innerParams = <span class="title function_">_extends</span>(&#123;&#125;, defaultParams, userParams);</span><br><span class="line"></span><br><span class="line">  <span class="title function_">setParameters</span>(innerParams);</span><br><span class="line">  <span class="title class_">Object</span>.<span class="title function_">freeze</span>(innerParams); <span class="comment">// clear the previous timer</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (globalState.<span class="property">timeout</span>) &#123;</span><br><span class="line">    globalState.<span class="property">timeout</span>.<span class="title function_">stop</span>();</span><br><span class="line">    <span class="keyword">delete</span> globalState.<span class="property">timeout</span>;</span><br><span class="line">  &#125; <span class="comment">// clear the restore focus timeout</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="built_in">clearTimeout</span>(globalState.<span class="property">restoreFocusTimeout</span>);</span><br><span class="line">  <span class="keyword">var</span> domCache = <span class="title function_">populateDomCache</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="title function_">render</span>(<span class="variable language_">this</span>, innerParams);</span><br><span class="line">  privateProps.<span class="property">innerParams</span>.<span class="title function_">set</span>(<span class="variable language_">this</span>, innerParams);</span><br><span class="line">  <span class="keyword">return</span> <span class="title function_">swalPromise</span>(<span class="variable language_">this</span>, domCache, innerParams);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> swalPromise = <span class="keyword">function</span> <span class="title function_">swalPromise</span>(<span class="params">instance, domCache, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span> (<span class="params">resolve</span>) &#123;</span><br><span class="line">    <span class="comment">// functions to handle all closings/dismissals</span></span><br><span class="line">    <span class="keyword">var</span> dismissWith = <span class="keyword">function</span> <span class="title function_">dismissWith</span>(<span class="params">dismiss</span>) &#123;</span><br><span class="line">      instance.<span class="title function_">closePopup</span>(&#123;</span><br><span class="line">        <span class="attr">dismiss</span>: dismiss</span><br><span class="line">      &#125;);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    privateMethods.<span class="property">swalPromiseResolve</span>.<span class="title function_">set</span>(instance, resolve);</span><br><span class="line">    <span class="title function_">setupTimer</span>(globalState, innerParams, dismissWith);</span><br><span class="line"></span><br><span class="line">    domCache.<span class="property">confirmButton</span>.<span class="property">onclick</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">handleConfirmButtonClick</span>(instance, innerParams);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    domCache.<span class="property">cancelButton</span>.<span class="property">onclick</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">handleCancelButtonClick</span>(instance, dismissWith);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    domCache.<span class="property">closeButton</span>.<span class="property">onclick</span> = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="title function_">dismissWith</span>(<span class="title class_">DismissReason</span>.<span class="property">close</span>);</span><br><span class="line">    &#125;;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">handlePopupClick</span>(domCache, innerParams, dismissWith);</span><br><span class="line">    <span class="title function_">addKeydownHandler</span>(instance, globalState, innerParams, dismissWith);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (innerParams.<span class="property">toast</span> &amp;&amp; (innerParams.<span class="property">input</span> || innerParams.<span class="property">footer</span> || innerParams.<span class="property">showCloseButton</span>)) &#123;</span><br><span class="line">      <span class="title function_">addClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses[<span class="string">&#x27;toast-column&#x27;</span>]);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      <span class="title function_">removeClass</span>(<span class="variable language_">document</span>.<span class="property">body</span>, swalClasses[<span class="string">&#x27;toast-column&#x27;</span>]);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="title function_">handleInputOptionsAndValue</span>(instance, innerParams);</span><br><span class="line">    <span class="title function_">openPopup</span>(innerParams);</span><br><span class="line">    <span class="title function_">initFocus</span>(domCache, innerParams); <span class="comment">// Scroll container to top on open (#1247)</span></span><br><span class="line"></span><br><span class="line">    domCache.<span class="property">container</span>.<span class="property">scrollTop</span> = <span class="number">0</span>;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> populateDomCache = <span class="keyword">function</span> <span class="title function_">populateDomCache</span>(<span class="params">instance</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> domCache = &#123;</span><br><span class="line">    <span class="attr">popup</span>: <span class="title function_">getPopup</span>(),</span><br><span class="line">    <span class="attr">container</span>: <span class="title function_">getContainer</span>(),</span><br><span class="line">    <span class="attr">content</span>: <span class="title function_">getContent</span>(),</span><br><span class="line">    <span class="attr">actions</span>: <span class="title function_">getActions</span>(),</span><br><span class="line">    <span class="attr">confirmButton</span>: <span class="title function_">getConfirmButton</span>(),</span><br><span class="line">    <span class="attr">cancelButton</span>: <span class="title function_">getCancelButton</span>(),</span><br><span class="line">    <span class="attr">closeButton</span>: <span class="title function_">getCloseButton</span>(),</span><br><span class="line">    <span class="attr">validationMessage</span>: <span class="title function_">getValidationMessage</span>(),</span><br><span class="line">    <span class="attr">progressSteps</span>: <span class="title function_">getProgressSteps</span>()</span><br><span class="line">  &#125;;</span><br><span class="line">  privateProps.<span class="property">domCache</span>.<span class="title function_">set</span>(instance, domCache);</span><br><span class="line">  <span class="keyword">return</span> domCache;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> setupTimer = <span class="keyword">function</span> <span class="title function_">setupTimer</span>(<span class="params">globalState$$1, innerParams, dismissWith</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">timer</span>) &#123;</span><br><span class="line">    globalState$$1.<span class="property">timeout</span> = <span class="keyword">new</span> <span class="title class_">Timer</span>(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">      <span class="title function_">dismissWith</span>(<span class="string">&#x27;timer&#x27;</span>);</span><br><span class="line">      <span class="keyword">delete</span> globalState$$1.<span class="property">timeout</span>;</span><br><span class="line">    &#125;, innerParams.<span class="property">timer</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> initFocus = <span class="keyword">function</span> <span class="title function_">initFocus</span>(<span class="params">domCache, innerParams</span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">toast</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!<span class="title function_">callIfFunction</span>(innerParams.<span class="property">allowEnterKey</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">blurActiveElement</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">focusCancel</span> &amp;&amp; <span class="title function_">isVisible</span>(domCache.<span class="property">cancelButton</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span> domCache.<span class="property">cancelButton</span>.<span class="title function_">focus</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (innerParams.<span class="property">focusConfirm</span> &amp;&amp; <span class="title function_">isVisible</span>(domCache.<span class="property">confirmButton</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span> domCache.<span class="property">confirmButton</span>.<span class="title function_">focus</span>();</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="title function_">setFocus</span>(innerParams, -<span class="number">1</span>, <span class="number">1</span>);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> blurActiveElement = <span class="keyword">function</span> <span class="title function_">blurActiveElement</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">activeElement</span> &amp;&amp; <span class="keyword">typeof</span> <span class="variable language_">document</span>.<span class="property">activeElement</span>.<span class="property">blur</span> === <span class="string">&#x27;function&#x27;</span>) &#123;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">activeElement</span>.<span class="title function_">blur</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Updates popup parameters.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">update</span>(<span class="params">params</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> popup = <span class="title function_">getPopup</span>();</span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (!popup || <span class="title function_">hasClass</span>(popup, swalClasses.<span class="property">hide</span>)) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title function_">warn</span>(<span class="string">&quot;You&#x27;re trying to update the closed or closing popup, that won&#x27;t work. Use the update() method in preConfirm parameter or show a new popup.&quot;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> validUpdatableParams = &#123;&#125;; <span class="comment">// assign valid params from `params` to `defaults`</span></span><br><span class="line"></span><br><span class="line">  <span class="title class_">Object</span>.<span class="title function_">keys</span>(params).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">param</span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="title class_">Swal</span>.<span class="title function_">isUpdatableParameter</span>(param)) &#123;</span><br><span class="line">      validUpdatableParams[param] = params[param];</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      <span class="title function_">warn</span>(<span class="string">&quot;Invalid parameter to update: \&quot;&quot;</span>.<span class="title function_">concat</span>(param, <span class="string">&quot;\&quot;. Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js&quot;</span>));</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">var</span> innerParams = privateProps.<span class="property">innerParams</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> updatedParams = <span class="title function_">_extends</span>(&#123;&#125;, innerParams, validUpdatableParams);</span><br><span class="line"></span><br><span class="line">  <span class="title function_">render</span>(<span class="variable language_">this</span>, updatedParams);</span><br><span class="line">  privateProps.<span class="property">innerParams</span>.<span class="title function_">set</span>(<span class="variable language_">this</span>, updatedParams);</span><br><span class="line">  <span class="title class_">Object</span>.<span class="title function_">defineProperties</span>(<span class="variable language_">this</span>, &#123;</span><br><span class="line">    <span class="attr">params</span>: &#123;</span><br><span class="line">      <span class="attr">value</span>: <span class="title function_">_extends</span>(&#123;&#125;, <span class="variable language_">this</span>.<span class="property">params</span>, params),</span><br><span class="line">      <span class="attr">writable</span>: <span class="literal">false</span>,</span><br><span class="line">      <span class="attr">enumerable</span>: <span class="literal">true</span></span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> instanceMethods = <span class="title class_">Object</span>.<span class="title function_">freeze</span>(&#123;</span><br><span class="line">    <span class="attr">hideLoading</span>: hideLoading,</span><br><span class="line">    <span class="attr">disableLoading</span>: hideLoading,</span><br><span class="line">    <span class="attr">getInput</span>: getInput$1,</span><br><span class="line">    <span class="attr">close</span>: close,</span><br><span class="line">    <span class="attr">closePopup</span>: close,</span><br><span class="line">    <span class="attr">closeModal</span>: close,</span><br><span class="line">    <span class="attr">closeToast</span>: close,</span><br><span class="line">    <span class="attr">enableButtons</span>: enableButtons,</span><br><span class="line">    <span class="attr">disableButtons</span>: disableButtons,</span><br><span class="line">    <span class="attr">enableConfirmButton</span>: enableConfirmButton,</span><br><span class="line">    <span class="attr">disableConfirmButton</span>: disableConfirmButton,</span><br><span class="line">    <span class="attr">enableInput</span>: enableInput,</span><br><span class="line">    <span class="attr">disableInput</span>: disableInput,</span><br><span class="line">    <span class="attr">showValidationMessage</span>: showValidationMessage,</span><br><span class="line">    <span class="attr">resetValidationMessage</span>: resetValidationMessage$1,</span><br><span class="line">    <span class="attr">getProgressSteps</span>: getProgressSteps$1,</span><br><span class="line">    <span class="attr">setProgressSteps</span>: setProgressSteps,</span><br><span class="line">    <span class="attr">showProgressSteps</span>: showProgressSteps,</span><br><span class="line">    <span class="attr">hideProgressSteps</span>: hideProgressSteps,</span><br><span class="line">    <span class="attr">_main</span>: _main,</span><br><span class="line">    <span class="attr">update</span>: update</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> currentInstance; <span class="comment">// SweetAlert constructor</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">SweetAlert</span>(<span class="params"></span>) &#123;</span><br><span class="line">  <span class="comment">// Prevent run in Node env</span></span><br><span class="line"></span><br><span class="line">  <span class="comment">/* istanbul ignore if */</span></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="variable language_">window</span> === <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span>;</span><br><span class="line">  &#125; <span class="comment">// Check for the existence of Promise</span></span><br><span class="line"></span><br><span class="line">  <span class="comment">/* istanbul ignore if */</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="title class_">Promise</span> === <span class="string">&#x27;undefined&#x27;</span>) &#123;</span><br><span class="line">    <span class="title function_">error</span>(<span class="string">&#x27;This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  currentInstance = <span class="variable language_">this</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> _len = <span class="variable language_">arguments</span>.<span class="property">length</span>, args = <span class="keyword">new</span> <span class="title class_">Array</span>(_len), _key = <span class="number">0</span>; _key &lt; _len; _key++) &#123;</span><br><span class="line">    args[_key] = <span class="variable language_">arguments</span>[_key];</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> outerParams = <span class="title class_">Object</span>.<span class="title function_">freeze</span>(<span class="variable language_">this</span>.<span class="property">constructor</span>.<span class="title function_">argsToParams</span>(args));</span><br><span class="line">  <span class="title class_">Object</span>.<span class="title function_">defineProperties</span>(<span class="variable language_">this</span>, &#123;</span><br><span class="line">    <span class="attr">params</span>: &#123;</span><br><span class="line">      <span class="attr">value</span>: outerParams,</span><br><span class="line">      <span class="attr">writable</span>: <span class="literal">false</span>,</span><br><span class="line">      <span class="attr">enumerable</span>: <span class="literal">true</span>,</span><br><span class="line">      <span class="attr">configurable</span>: <span class="literal">true</span></span><br><span class="line">    &#125;</span><br><span class="line">  &#125;);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> promise = <span class="variable language_">this</span>.<span class="title function_">_main</span>(<span class="variable language_">this</span>.<span class="property">params</span>);</span><br><span class="line"></span><br><span class="line">  privateProps.<span class="property">promise</span>.<span class="title function_">set</span>(<span class="variable language_">this</span>, promise);</span><br><span class="line">&#125; <span class="comment">// `catch` cannot be the name of a module export, so we define our thenable methods here instead</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="title class_">SweetAlert</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">then</span> = <span class="keyword">function</span> (<span class="params">onFulfilled</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> promise = privateProps.<span class="property">promise</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="keyword">return</span> promise.<span class="title function_">then</span>(onFulfilled);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="title class_">SweetAlert</span>.<span class="property"><span class="keyword">prototype</span></span>[<span class="string">&quot;finally&quot;</span>] = <span class="keyword">function</span> (<span class="params">onFinally</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> promise = privateProps.<span class="property">promise</span>.<span class="title function_">get</span>(<span class="variable language_">this</span>);</span><br><span class="line">  <span class="keyword">return</span> promise[<span class="string">&quot;finally&quot;</span>](onFinally);</span><br><span class="line">&#125;; <span class="comment">// Assign instance methods from src/instanceMethods/*.js to prototype</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="title function_">_extends</span>(<span class="title class_">SweetAlert</span>.<span class="property"><span class="keyword">prototype</span></span>, instanceMethods); <span class="comment">// Assign static methods from src/staticMethods/*.js to constructor</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="title function_">_extends</span>(<span class="title class_">SweetAlert</span>, staticMethods); <span class="comment">// Proxy to instance methods to constructor, for now, for backwards compatibility</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="title class_">Object</span>.<span class="title function_">keys</span>(instanceMethods).<span class="title function_">forEach</span>(<span class="keyword">function</span> (<span class="params">key</span>) &#123;</span><br><span class="line">  <span class="title class_">SweetAlert</span>[key] = <span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (currentInstance) &#123;</span><br><span class="line">      <span class="keyword">var</span> _currentInstance;</span><br><span class="line"></span><br><span class="line">      <span class="keyword">return</span> (_currentInstance = currentInstance)[key].<span class="title function_">apply</span>(_currentInstance, <span class="variable language_">arguments</span>);</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;);</span><br><span class="line"><span class="title class_">SweetAlert</span>.<span class="property">DismissReason</span> = <span class="title class_">DismissReason</span>;</span><br><span class="line"><span class="title class_">SweetAlert</span>.<span class="property">version</span> = <span class="string">&#x27;8.19.0&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="title class_">Swal</span> = <span class="title class_">SweetAlert</span>;</span><br><span class="line"><span class="title class_">Swal</span>[<span class="string">&quot;default&quot;</span>] = <span class="title class_">Swal</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">return</span> <span class="title class_">Swal</span>;</span><br><span class="line"></span><br><span class="line">&#125;)));</span><br><span class="line"><span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="variable language_">this</span> !== <span class="string">&#x27;undefined&#x27;</span> &amp;&amp; <span class="variable language_">this</span>.<span class="property">Sweetalert2</span>)&#123;  <span class="variable language_">this</span>.<span class="property">swal</span> = <span class="variable language_">this</span>.<span class="property">sweetAlert</span> = <span class="variable language_">this</span>.<span class="property">Swal</span> = <span class="variable language_">this</span>.<span class="property">SweetAlert</span> = <span class="variable language_">this</span>.<span class="property">Sweetalert2</span>&#125;</span><br><span class="line"></span><br><span class="line"><span class="string">&quot;undefined&quot;</span>!=<span class="keyword">typeof</span> <span class="variable language_">document</span>&amp;&amp;<span class="keyword">function</span>(<span class="params">e,t</span>)&#123;<span class="keyword">var</span> n=e.<span class="title function_">createElement</span>(<span class="string">&quot;style&quot;</span>);<span class="keyword">if</span>(e.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;head&quot;</span>)[<span class="number">0</span>].<span class="title function_">appendChild</span>(n),n.<span class="property">styleSheet</span>)n.<span class="property">styleSheet</span>.<span class="property">disabled</span>||(n.<span class="property">styleSheet</span>.<span class="property">cssText</span>=t);<span class="keyword">else</span> <span class="keyword">try</span>&#123;n.<span class="property">innerHTML</span>=t&#125;<span class="keyword">catch</span>(e)&#123;n.<span class="property">innerText</span>=t&#125;&#125;(<span class="variable language_">document</span>,<span class="string">&quot;@charset \&quot;UTF-8\&quot;;.swal2-popup.swal2-toast&#123;flex-direction:row;align-items:center;width:auto;padding:.625em;overflow-y:hidden;box-shadow:0 0 .625em #d9d9d9&#125;.swal2-popup.swal2-toast .swal2-header&#123;flex-direction:row&#125;.swal2-popup.swal2-toast .swal2-title&#123;flex-grow:1;justify-content:flex-start;margin:0 .6em;font-size:1em&#125;.swal2-popup.swal2-toast .swal2-footer&#123;margin:.5em 0 0;padding:.5em 0 0;font-size:.8em&#125;.swal2-popup.swal2-toast .swal2-close&#123;position:static;width:.8em;height:.8em;line-height:.8&#125;.swal2-popup.swal2-toast .swal2-content&#123;justify-content:flex-start;font-size:1em&#125;.swal2-popup.swal2-toast .swal2-icon&#123;width:2em;min-width:2em;height:2em;margin:0&#125;.swal2-popup.swal2-toast .swal2-icon::before&#123;display:flex;align-items:center;font-size:2em;font-weight:700&#125;@media all and (-ms-high-contrast:none),(-ms-high-contrast:active)&#123;.swal2-popup.swal2-toast .swal2-icon::before&#123;font-size:.25em&#125;&#125;.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring&#123;width:2em;height:2em&#125;.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]&#123;top:.875em;width:1.375em&#125;.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]&#123;left:.3125em&#125;.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]&#123;right:.3125em&#125;.swal2-popup.swal2-toast .swal2-actions&#123;flex-basis:auto!important;width:auto;height:auto;margin:0 .3125em&#125;.swal2-popup.swal2-toast .swal2-styled&#123;margin:0 .3125em;padding:.3125em .625em;font-size:1em&#125;.swal2-popup.swal2-toast .swal2-styled:focus&#123;box-shadow:0 0 0 .0625em #fff,0 0 0 .125em rgba(50,100,150,.4)&#125;.swal2-popup.swal2-toast .swal2-success&#123;border-color:#a5dc86&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]&#123;position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]&#123;top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]&#123;top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0&#125;.swal2-popup.swal2-toast .swal2-success .swal2-success-ring&#123;width:2em;height:2em&#125;.swal2-popup.swal2-toast .swal2-success .swal2-success-fix&#123;top:0;left:.4375em;width:.4375em;height:2.6875em&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]&#123;height:.3125em&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]&#123;top:1.125em;left:.1875em;width:.75em&#125;.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]&#123;top:.9375em;right:.1875em;width:1.375em&#125;.swal2-popup.swal2-toast.swal2-show&#123;-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s&#125;.swal2-popup.swal2-toast.swal2-hide&#123;-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards&#125;.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip&#123;-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s&#125;.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long&#123;-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s&#125;.swal2-container&#123;display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;background-color:transparent;-webkit-overflow-scrolling:touch&#125;.swal2-container.swal2-top&#123;align-items:flex-start&#125;.swal2-container.swal2-top-left,.swal2-container.swal2-top-start&#123;align-items:flex-start;justify-content:flex-start&#125;.swal2-container.swal2-top-end,.swal2-container.swal2-top-right&#123;align-items:flex-start;justify-content:flex-end&#125;.swal2-container.swal2-center&#123;align-items:center&#125;.swal2-container.swal2-center-left,.swal2-container.swal2-center-start&#123;align-items:center;justify-content:flex-start&#125;.swal2-container.swal2-center-end,.swal2-container.swal2-center-right&#123;align-items:center;justify-content:flex-end&#125;.swal2-container.swal2-bottom&#123;align-items:flex-end&#125;.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start&#123;align-items:flex-end;justify-content:flex-start&#125;.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right&#123;align-items:flex-end;justify-content:flex-end&#125;.swal2-container.swal2-bottom-end&gt;:first-child,.swal2-container.swal2-bottom-left&gt;:first-child,.swal2-container.swal2-bottom-right&gt;:first-child,.swal2-container.swal2-bottom-start&gt;:first-child,.swal2-container.swal2-bottom&gt;:first-child&#123;margin-top:auto&#125;.swal2-container.swal2-grow-fullscreen&gt;.swal2-modal&#123;display:flex!important;flex:1;align-self:stretch;justify-content:center&#125;.swal2-container.swal2-grow-row&gt;.swal2-modal&#123;display:flex!important;flex:1;align-content:center;justify-content:center&#125;.swal2-container.swal2-grow-column&#123;flex:1;flex-direction:column&#125;.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top&#123;align-items:center&#125;.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start&#123;align-items:flex-start&#125;.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right&#123;align-items:flex-end&#125;.swal2-container.swal2-grow-column&gt;.swal2-modal&#123;display:flex!important;flex:1;align-content:center;justify-content:center&#125;.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)&gt;.swal2-modal&#123;margin:auto&#125;@media all and (-ms-high-contrast:none),(-ms-high-contrast:active)&#123;.swal2-container .swal2-modal&#123;margin:0!important&#125;&#125;.swal2-container.swal2-shown&#123;background-color:rgba(0,0,0,.4)&#125;.swal2-popup&#123;display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem&#125;.swal2-popup:focus&#123;outline:0&#125;.swal2-popup.swal2-loading&#123;overflow-y:hidden&#125;.swal2-header&#123;display:flex;flex-direction:column;align-items:center&#125;.swal2-title&#123;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word&#125;.swal2-actions&#123;display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0&#125;.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]&#123;opacity:.4&#125;.swal2-actions:not(.swal2-loading) .swal2-styled:hover&#123;background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))&#125;.swal2-actions:not(.swal2-loading) .swal2-styled:active&#123;background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))&#125;.swal2-actions.swal2-loading .swal2-styled.swal2-confirm&#123;box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none&#125;.swal2-actions.swal2-loading .swal2-styled.swal2-cancel&#123;margin-right:30px;margin-left:30px&#125;.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after&#123;content:\&quot;\&quot;;display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff&#125;.swal2-styled&#123;margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500&#125;.swal2-styled:not([disabled])&#123;cursor:pointer&#125;.swal2-styled.swal2-confirm&#123;border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em&#125;.swal2-styled.swal2-cancel&#123;border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em&#125;.swal2-styled:focus&#123;outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)&#125;.swal2-styled::-moz-focus-inner&#123;border:0&#125;.swal2-footer&#123;justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em&#125;.swal2-image&#123;max-width:100%;margin:1.25em auto&#125;.swal2-close&#123;position:absolute;z-index:2;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer&#125;.swal2-close:hover&#123;transform:none;background:0 0;color:#f27474&#125;.swal2-content&#123;z-index:1;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word&#125;.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea&#123;margin:1em auto&#125;.swal2-file,.swal2-input,.swal2-textarea&#123;box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em&#125;.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror&#123;border-color:#f27474!important;box-shadow:0 0 2px #f27474!important&#125;.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus&#123;border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5&#125;.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder&#123;color:#ccc&#125;.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder&#123;color:#ccc&#125;.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder&#123;color:#ccc&#125;.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder&#123;color:#ccc&#125;.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder&#123;color:#ccc&#125;.swal2-range&#123;margin:1em auto;background:inherit&#125;.swal2-range input&#123;width:80%&#125;.swal2-range output&#123;width:20%;color:inherit;font-weight:600;text-align:center&#125;.swal2-range input,.swal2-range output&#123;height:2.625em;padding:0;font-size:1.125em;line-height:2.625em&#125;.swal2-input&#123;height:2.625em;padding:0 .75em&#125;.swal2-input[type=number]&#123;max-width:10em&#125;.swal2-file&#123;background:inherit;font-size:1.125em&#125;.swal2-textarea&#123;height:6.75em;padding:.75em&#125;.swal2-select&#123;min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em&#125;.swal2-checkbox,.swal2-radio&#123;align-items:center;justify-content:center;background:inherit;color:inherit&#125;.swal2-checkbox label,.swal2-radio label&#123;margin:0 .6em;font-size:1.125em&#125;.swal2-checkbox input,.swal2-radio input&#123;margin:0 .4em&#125;.swal2-validation-message&#123;display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300&#125;.swal2-validation-message::before&#123;content:\&quot;!\&quot;;display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center&#125;.swal2-icon&#123;position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none&#125;.swal2-icon::before&#123;display:flex;align-items:center;height:92%;font-size:3.75em&#125;.swal2-icon.swal2-error&#123;border-color:#f27474&#125;.swal2-icon.swal2-error .swal2-x-mark&#123;position:relative;flex-grow:1&#125;.swal2-icon.swal2-error [class^=swal2-x-mark-line]&#123;display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474&#125;.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]&#123;left:1.0625em;transform:rotate(45deg)&#125;.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]&#123;right:1em;transform:rotate(-45deg)&#125;.swal2-icon.swal2-warning&#123;border-color:#facea8;color:#f8bb86&#125;.swal2-icon.swal2-warning::before&#123;content:\&quot;!\&quot;&#125;.swal2-icon.swal2-info&#123;border-color:#9de0f6;color:#3fc3ee&#125;.swal2-icon.swal2-info::before&#123;content:\&quot;i\&quot;&#125;.swal2-icon.swal2-question&#123;border-color:#c9dae1;color:#87adbd&#125;.swal2-icon.swal2-question::before&#123;content:\&quot;?\&quot;&#125;.swal2-icon.swal2-question.swal2-arabic-question-mark::before&#123;content:\&quot;؟\&quot;&#125;.swal2-icon.swal2-success&#123;border-color:#a5dc86&#125;.swal2-icon.swal2-success [class^=swal2-success-circular-line]&#123;position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%&#125;.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]&#123;top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em&#125;.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]&#123;top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0&#125;.swal2-icon.swal2-success .swal2-success-ring&#123;position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%&#125;.swal2-icon.swal2-success .swal2-success-fix&#123;position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)&#125;.swal2-icon.swal2-success [class^=swal2-success-line]&#123;display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86&#125;.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]&#123;top:2.875em;left:.875em;width:1.5625em;transform:rotate(45deg)&#125;.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]&#123;top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)&#125;.swal2-progress-steps&#123;align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600&#125;.swal2-progress-steps li&#123;display:inline-block;position:relative&#125;.swal2-progress-steps .swal2-progress-step&#123;z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center&#125;.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step&#123;background:#3085d6&#125;.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step&#123;background:#add8e6;color:#fff&#125;.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line&#123;background:#add8e6&#125;.swal2-progress-steps .swal2-progress-step-line&#123;z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6&#125;[class^=swal2]&#123;-webkit-tap-highlight-color:transparent&#125;.swal2-show&#123;-webkit-animation:swal2-show .3s;animation:swal2-show .3s&#125;.swal2-show.swal2-noanimation&#123;-webkit-animation:none;animation:none&#125;.swal2-hide&#123;-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards&#125;.swal2-hide.swal2-noanimation&#123;-webkit-animation:none;animation:none&#125;.swal2-rtl .swal2-close&#123;right:auto;left:0&#125;.swal2-animate-success-icon .swal2-success-line-tip&#123;-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s&#125;.swal2-animate-success-icon .swal2-success-line-long&#123;-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s&#125;.swal2-animate-success-icon .swal2-success-circular-line-right&#123;-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in&#125;.swal2-animate-error-icon&#123;-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s&#125;.swal2-animate-error-icon .swal2-x-mark&#123;-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s&#125;@supports (-ms-accelerator:true)&#123;.swal2-range input&#123;width:100%!important&#125;.swal2-range output&#123;display:none&#125;&#125;@media all and (-ms-high-contrast:none),(-ms-high-contrast:active)&#123;.swal2-range input&#123;width:100%!important&#125;.swal2-range output&#123;display:none&#125;&#125;@-moz-document url-prefix()&#123;.swal2-close:focus&#123;outline:2px solid rgba(50,100,150,.4)&#125;&#125;@-webkit-keyframes swal2-toast-show&#123;0%&#123;transform:translateY(-.625em) rotateZ(2deg)&#125;33%&#123;transform:translateY(0) rotateZ(-2deg)&#125;66%&#123;transform:translateY(.3125em) rotateZ(2deg)&#125;100%&#123;transform:translateY(0) rotateZ(0)&#125;&#125;@keyframes swal2-toast-show&#123;0%&#123;transform:translateY(-.625em) rotateZ(2deg)&#125;33%&#123;transform:translateY(0) rotateZ(-2deg)&#125;66%&#123;transform:translateY(.3125em) rotateZ(2deg)&#125;100%&#123;transform:translateY(0) rotateZ(0)&#125;&#125;@-webkit-keyframes swal2-toast-hide&#123;100%&#123;transform:rotateZ(1deg);opacity:0&#125;&#125;@keyframes swal2-toast-hide&#123;100%&#123;transform:rotateZ(1deg);opacity:0&#125;&#125;@-webkit-keyframes swal2-toast-animate-success-line-tip&#123;0%&#123;top:.5625em;left:.0625em;width:0&#125;54%&#123;top:.125em;left:.125em;width:0&#125;70%&#123;top:.625em;left:-.25em;width:1.625em&#125;84%&#123;top:1.0625em;left:.75em;width:.5em&#125;100%&#123;top:1.125em;left:.1875em;width:.75em&#125;&#125;@keyframes swal2-toast-animate-success-line-tip&#123;0%&#123;top:.5625em;left:.0625em;width:0&#125;54%&#123;top:.125em;left:.125em;width:0&#125;70%&#123;top:.625em;left:-.25em;width:1.625em&#125;84%&#123;top:1.0625em;left:.75em;width:.5em&#125;100%&#123;top:1.125em;left:.1875em;width:.75em&#125;&#125;@-webkit-keyframes swal2-toast-animate-success-line-long&#123;0%&#123;top:1.625em;right:1.375em;width:0&#125;65%&#123;top:1.25em;right:.9375em;width:0&#125;84%&#123;top:.9375em;right:0;width:1.125em&#125;100%&#123;top:.9375em;right:.1875em;width:1.375em&#125;&#125;@keyframes swal2-toast-animate-success-line-long&#123;0%&#123;top:1.625em;right:1.375em;width:0&#125;65%&#123;top:1.25em;right:.9375em;width:0&#125;84%&#123;top:.9375em;right:0;width:1.125em&#125;100%&#123;top:.9375em;right:.1875em;width:1.375em&#125;&#125;@-webkit-keyframes swal2-show&#123;0%&#123;transform:scale(.7)&#125;45%&#123;transform:scale(1.05)&#125;80%&#123;transform:scale(.95)&#125;100%&#123;transform:scale(1)&#125;&#125;@keyframes swal2-show&#123;0%&#123;transform:scale(.7)&#125;45%&#123;transform:scale(1.05)&#125;80%&#123;transform:scale(.95)&#125;100%&#123;transform:scale(1)&#125;&#125;@-webkit-keyframes swal2-hide&#123;0%&#123;transform:scale(1);opacity:1&#125;100%&#123;transform:scale(.5);opacity:0&#125;&#125;@keyframes swal2-hide&#123;0%&#123;transform:scale(1);opacity:1&#125;100%&#123;transform:scale(.5);opacity:0&#125;&#125;@-webkit-keyframes swal2-animate-success-line-tip&#123;0%&#123;top:1.1875em;left:.0625em;width:0&#125;54%&#123;top:1.0625em;left:.125em;width:0&#125;70%&#123;top:2.1875em;left:-.375em;width:3.125em&#125;84%&#123;top:3em;left:1.3125em;width:1.0625em&#125;100%&#123;top:2.8125em;left:.875em;width:1.5625em&#125;&#125;@keyframes swal2-animate-success-line-tip&#123;0%&#123;top:1.1875em;left:.0625em;width:0&#125;54%&#123;top:1.0625em;left:.125em;width:0&#125;70%&#123;top:2.1875em;left:-.375em;width:3.125em&#125;84%&#123;top:3em;left:1.3125em;width:1.0625em&#125;100%&#123;top:2.8125em;left:.875em;width:1.5625em&#125;&#125;@-webkit-keyframes swal2-animate-success-line-long&#123;0%&#123;top:3.375em;right:2.875em;width:0&#125;65%&#123;top:3.375em;right:2.875em;width:0&#125;84%&#123;top:2.1875em;right:0;width:3.4375em&#125;100%&#123;top:2.375em;right:.5em;width:2.9375em&#125;&#125;@keyframes swal2-animate-success-line-long&#123;0%&#123;top:3.375em;right:2.875em;width:0&#125;65%&#123;top:3.375em;right:2.875em;width:0&#125;84%&#123;top:2.1875em;right:0;width:3.4375em&#125;100%&#123;top:2.375em;right:.5em;width:2.9375em&#125;&#125;@-webkit-keyframes swal2-rotate-success-circular-line&#123;0%&#123;transform:rotate(-45deg)&#125;5%&#123;transform:rotate(-45deg)&#125;12%&#123;transform:rotate(-405deg)&#125;100%&#123;transform:rotate(-405deg)&#125;&#125;@keyframes swal2-rotate-success-circular-line&#123;0%&#123;transform:rotate(-45deg)&#125;5%&#123;transform:rotate(-45deg)&#125;12%&#123;transform:rotate(-405deg)&#125;100%&#123;transform:rotate(-405deg)&#125;&#125;@-webkit-keyframes swal2-animate-error-x-mark&#123;0%&#123;margin-top:1.625em;transform:scale(.4);opacity:0&#125;50%&#123;margin-top:1.625em;transform:scale(.4);opacity:0&#125;80%&#123;margin-top:-.375em;transform:scale(1.15)&#125;100%&#123;margin-top:0;transform:scale(1);opacity:1&#125;&#125;@keyframes swal2-animate-error-x-mark&#123;0%&#123;margin-top:1.625em;transform:scale(.4);opacity:0&#125;50%&#123;margin-top:1.625em;transform:scale(.4);opacity:0&#125;80%&#123;margin-top:-.375em;transform:scale(1.15)&#125;100%&#123;margin-top:0;transform:scale(1);opacity:1&#125;&#125;@-webkit-keyframes swal2-animate-error-icon&#123;0%&#123;transform:rotateX(100deg);opacity:0&#125;100%&#123;transform:rotateX(0);opacity:1&#125;&#125;@keyframes swal2-animate-error-icon&#123;0%&#123;transform:rotateX(100deg);opacity:0&#125;100%&#123;transform:rotateX(0);opacity:1&#125;&#125;@-webkit-keyframes swal2-rotate-loading&#123;0%&#123;transform:rotate(0)&#125;100%&#123;transform:rotate(360deg)&#125;&#125;@keyframes swal2-rotate-loading&#123;0%&#123;transform:rotate(0)&#125;100%&#123;transform:rotate(360deg)&#125;&#125;body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)&#123;overflow:hidden&#125;body.swal2-height-auto&#123;height:auto!important&#125;body.swal2-no-backdrop .swal2-shown&#123;top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent&#125;body.swal2-no-backdrop .swal2-shown&gt;.swal2-modal&#123;box-shadow:0 0 10px rgba(0,0,0,.4)&#125;body.swal2-no-backdrop .swal2-shown.swal2-top&#123;top:0;left:50%;transform:translateX(-50%)&#125;body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start&#123;top:0;left:0&#125;body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right&#123;top:0;right:0&#125;body.swal2-no-backdrop .swal2-shown.swal2-center&#123;top:50%;left:50%;transform:translate(-50%,-50%)&#125;body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start&#123;top:50%;left:0;transform:translateY(-50%)&#125;body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right&#123;top:50%;right:0;transform:translateY(-50%)&#125;body.swal2-no-backdrop .swal2-shown.swal2-bottom&#123;bottom:0;left:50%;transform:translateX(-50%)&#125;body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start&#123;bottom:0;left:0&#125;body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right&#123;right:0;bottom:0&#125;@media print&#123;body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)&#123;overflow-y:scroll!important&#125;body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)&gt;[aria-hidden=true]&#123;display:none&#125;body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container&#123;position:static!important&#125;&#125;body.swal2-toast-shown .swal2-container&#123;background-color:transparent&#125;body.swal2-toast-shown .swal2-container.swal2-shown&#123;background-color:transparent&#125;body.swal2-toast-shown .swal2-container.swal2-top&#123;top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)&#125;body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right&#123;top:0;right:0;bottom:auto;left:auto&#125;body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start&#123;top:0;right:auto;bottom:auto;left:0&#125;body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start&#123;top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)&#125;body.swal2-toast-shown .swal2-container.swal2-center&#123;top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)&#125;body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right&#123;top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)&#125;body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start&#123;top:auto;right:auto;bottom:0;left:0&#125;body.swal2-toast-shown .swal2-container.swal2-bottom&#123;top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)&#125;body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right&#123;top:auto;right:0;bottom:0;left:auto&#125;body.swal2-toast-column .swal2-toast&#123;flex-direction:column;align-items:stretch&#125;body.swal2-toast-column .swal2-toast .swal2-actions&#123;flex:1;align-self:stretch;height:2.2em;margin-top:.3125em&#125;body.swal2-toast-column .swal2-toast .swal2-loading&#123;justify-content:center&#125;body.swal2-toast-column .swal2-toast .swal2-input&#123;height:2em;margin:.3125em auto;font-size:1em&#125;body.swal2-toast-column .swal2-toast .swal2-validation-message&#123;font-size:1em&#125;&quot;</span>);</span><br></pre></td></tr></table></figure><h4 id="主题配置文件的-inject里面引入"><a href="#主题配置文件的-inject里面引入" class="headerlink" title="主题配置文件的 inject里面引入"></a>主题配置文件的 inject里面引入</h4><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">...</span></span><br><span class="line">  <span class="attr">bottom:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;/js/lunar.js&quot;&gt;&lt;/script&gt;</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;/js/day.js&quot;&gt;&lt;/script&gt;</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">type=&quot;text/javascript&quot;</span> <span class="string">src=&quot;https://cdn1.tianli0.top/npm/sweetalert2@8.19.0/dist/sweetalert2.all.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure><h3 id="方案二"><a href="#方案二" class="headerlink" title="方案二"></a>方案二</h3><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* */</span></span><br><span class="line"><span class="keyword">if</span> (<span class="title class_">PublicSacrificeDay</span>()) &#123;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementsByTagName</span>(<span class="string">&quot;html&quot;</span>)[<span class="number">0</span>].<span class="title function_">setAttribute</span>(<span class="string">&quot;style&quot;</span>, <span class="string">&quot;filter:gray !important;filter:grayscale(100%);-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);&quot;</span>);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">function</span> <span class="title function_">PublicSacrificeDay</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">var</span> <span class="title class_">PSFarr</span> = <span class="keyword">new</span> <span class="title class_">Array</span>(<span class="string">&quot;0404&quot;</span>, <span class="string">&quot;0405&quot;</span>, <span class="string">&quot;0414&quot;</span>, <span class="string">&quot;0512&quot;</span>, <span class="string">&quot;0707&quot;</span>, <span class="string">&quot;0807&quot;</span>, <span class="string">&quot;0814&quot;</span>, <span class="string">&quot;0909&quot;</span>, <span class="string">&quot;0918&quot;</span>, <span class="string">&quot;0930&quot;</span>, <span class="string">&quot;1025&quot;</span>, <span class="string">&quot;1130&quot;</span>, <span class="string">&quot;1213&quot;</span>);</span><br><span class="line">    <span class="keyword">var</span> currentdate = <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line">    <span class="keyword">var</span> str = <span class="string">&quot;&quot;</span>;</span><br><span class="line">    <span class="keyword">var</span> mm = currentdate.<span class="title function_">getMonth</span>() + <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">if</span> (currentdate.<span class="title function_">getMonth</span>() &gt; <span class="number">9</span>) &#123;</span><br><span class="line">      str += mm;</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      str += <span class="string">&quot;0&quot;</span> + mm;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (currentdate.<span class="title function_">getDate</span>() &gt; <span class="number">9</span>) &#123;</span><br><span class="line">      str += currentdate.<span class="title function_">getDate</span>();</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      str += <span class="string">&quot;0&quot;</span> + currentdate.<span class="title function_">getDate</span>();</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (<span class="title class_">PSFarr</span>.<span class="title function_">indexOf</span>(str) &gt; -<span class="number">1</span>) &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="number">1</span>;</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">      <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure><p>在主题配置文件的 inject里面引入</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">...</span></span><br><span class="line">  <span class="attr">bottom:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;/js/2.js&quot;&gt;&lt;/script&gt;</span></span><br></pre></td></tr></table></figure><p><strong>注意：方案二无弹框</strong></p><h2 id="评论表情包放大功能，超实用"><a href="#评论表情包放大功能，超实用" class="headerlink" title="评论表情包放大功能，超实用"></a>评论表情包放大功能，超实用</h2><blockquote><p>本教程来自<a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.leonus.cn/2022/owo-big.html">Leonus</a></p></blockquote><h3 id="js"><a href="#js" class="headerlink" title="js"></a>js</h3><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 如果当前页有评论就执行函数</span></span><br><span class="line"><span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;post-comment&#x27;</span>)) <span class="title function_">owoBig</span>();</span><br><span class="line"><span class="comment">// 表情放大</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">owoBig</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> flag = <span class="number">1</span>, <span class="comment">// 设置节流阀</span></span><br><span class="line">        owo_time = <span class="string">&#x27;&#x27;</span>, <span class="comment">// 设置计时器</span></span><br><span class="line">        m = <span class="number">3</span>; <span class="comment">// 设置放大倍数</span></span><br><span class="line">    <span class="comment">// 创建盒子</span></span><br><span class="line">    <span class="keyword">let</span> div = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;div&#x27;</span>),</span><br><span class="line">        body = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&#x27;body&#x27;</span>);</span><br><span class="line">    <span class="comment">// 设置ID</span></span><br><span class="line">    div.<span class="property">id</span> = <span class="string">&#x27;owo-big&#x27;</span>;</span><br><span class="line">    <span class="comment">// 插入盒子</span></span><br><span class="line">    body.<span class="title function_">appendChild</span>(div)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 构造observer</span></span><br><span class="line">    <span class="keyword">let</span> observer = <span class="keyword">new</span> <span class="title class_">MutationObserver</span>(<span class="function"><span class="params">mutations</span> =&gt;</span> &#123;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; mutations.<span class="property">length</span>; i++) &#123;</span><br><span class="line">            <span class="keyword">let</span> dom = mutations[i].<span class="property">addedNodes</span>,</span><br><span class="line">                owo_body = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">            <span class="keyword">if</span> (dom.<span class="property">length</span> == <span class="number">2</span> &amp;&amp; dom[<span class="number">1</span>].<span class="property">className</span> == <span class="string">&#x27;OwO-body&#x27;</span>) owo_body = dom[<span class="number">1</span>];</span><br><span class="line">            <span class="comment">// 如果需要在评论内容中启用此功能请解除下面的注释</span></span><br><span class="line">            <span class="comment">// else if (dom.length == 1 &amp;&amp; dom[0].className == &#x27;tk-comment&#x27;) owo_body = dom[0];</span></span><br><span class="line">            <span class="keyword">else</span> <span class="keyword">continue</span>;</span><br><span class="line"></span><br><span class="line">            <span class="comment">// 禁用右键（手机端长按会出现右键菜单，为了体验给禁用掉）</span></span><br><span class="line">            <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="property">body</span>.<span class="property">clientWidth</span> &lt;= <span class="number">768</span>) owo_body.<span class="title function_">addEventListener</span>(<span class="string">&#x27;contextmenu&#x27;</span>, <span class="function"><span class="params">e</span> =&gt;</span> e.<span class="title function_">preventDefault</span>());</span><br><span class="line">            <span class="comment">// 鼠标移入</span></span><br><span class="line">            owo_body.<span class="property">onmouseover</span> = <span class="function">(<span class="params">e</span>) =&gt;</span> &#123;</span><br><span class="line">                    <span class="keyword">if</span> (flag &amp;&amp; e.<span class="property">target</span>.<span class="property">tagName</span> == <span class="string">&#x27;IMG&#x27;</span>) &#123;</span><br><span class="line">                        flag = <span class="number">0</span>;</span><br><span class="line">                        <span class="comment">// 移入300毫秒后显示盒子</span></span><br><span class="line">                        owo_time = <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">                            <span class="keyword">let</span> height = e.<span class="property">target</span>.<span class="property">clientHeight</span> * m, <span class="comment">// 盒子高 2023-02-16更新</span></span><br><span class="line">                                width = e.<span class="property">target</span>.<span class="property">clientWidth</span> * m, <span class="comment">// 盒子宽 2023-02-16更新</span></span><br><span class="line">                                left = (e.<span class="property">x</span> - e.<span class="property">offsetX</span>) - (width - e.<span class="property">target</span>.<span class="property">clientWidth</span>) / <span class="number">2</span>, <span class="comment">// 盒子与屏幕左边距离 2023-02-16更新</span></span><br><span class="line">                                top = e.<span class="property">y</span> - e.<span class="property">offsetY</span>; <span class="comment">// 盒子与屏幕顶部距离</span></span><br><span class="line"></span><br><span class="line">                            <span class="keyword">if</span> ((left + width) &gt; body.<span class="property">clientWidth</span>) left -= ((left + width) - body.<span class="property">clientWidth</span> + <span class="number">10</span>); <span class="comment">// 右边缘检测，防止超出屏幕</span></span><br><span class="line">                            <span class="keyword">if</span> (left &lt; <span class="number">0</span>) left = <span class="number">10</span>; <span class="comment">// 左边缘检测，防止超出屏幕</span></span><br><span class="line">                            <span class="comment">// 设置盒子样式</span></span><br><span class="line">                            div.<span class="property">style</span>.<span class="property">cssText</span> = <span class="string">`display:flex; height:<span class="subst">$&#123;height&#125;</span>px; width:<span class="subst">$&#123;width&#125;</span>px; left:<span class="subst">$&#123;left&#125;</span>px; top:<span class="subst">$&#123;top&#125;</span>px;`</span>;</span><br><span class="line">                            <span class="comment">// 在盒子中插入图片</span></span><br><span class="line">                            div.<span class="property">innerHTML</span> = <span class="string">`&lt;img src=&quot;<span class="subst">$&#123;e.target.src&#125;</span>&quot;&gt;`</span></span><br><span class="line">                        &#125;, <span class="number">300</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;;</span><br><span class="line">            <span class="comment">// 鼠标移出隐藏盒子</span></span><br><span class="line">            owo_body.<span class="property">onmouseout</span> = <span class="function">() =&gt;</span> &#123; div.<span class="property">style</span>.<span class="property">display</span> = <span class="string">&#x27;none&#x27;</span>, flag = <span class="number">1</span>, <span class="built_in">clearTimeout</span>(owo_time); &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">    &#125;)</span><br><span class="line">    observer.<span class="title function_">observe</span>(<span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;post-comment&#x27;</span>), &#123; <span class="attr">subtree</span>: <span class="literal">true</span>, <span class="attr">childList</span>: <span class="literal">true</span> &#125;) <span class="comment">// 监听的 元素 和 配置项</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h3 id="css"><a href="#css" class="headerlink" title="css"></a>css</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#owo-big</span> &#123;</span><br><span class="line">    <span class="attribute">position</span>: fixed;</span><br><span class="line">    <span class="attribute">align-items</span>: center;</span><br><span class="line">    <span class="attribute">background-color</span>: <span class="built_in">rgb</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>);</span><br><span class="line">    <span class="attribute">border</span>: <span class="number">1px</span> <span class="number">#aaa</span> solid;</span><br><span class="line">    <span class="attribute">border-radius</span>: <span class="number">10px</span>;</span><br><span class="line">    <span class="attribute">z-index</span>: <span class="number">9999</span>;</span><br><span class="line">    <span class="attribute">display</span>: none;</span><br><span class="line">    <span class="attribute">transform</span>: <span class="built_in">translate</span>(<span class="number">0</span>, -<span class="number">105%</span>);</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">    <span class="attribute">animation</span>: owoIn <span class="number">0.3s</span> <span class="built_in">cubic-bezier</span>(<span class="number">0.42</span>, <span class="number">0</span>, <span class="number">0.3</span>, <span class="number">1.11</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-attr">[data-theme=dark]</span> <span class="selector-id">#owo-big</span> &#123;</span><br><span class="line">    <span class="attribute">background-color</span>: <span class="number">#4a4a4a</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-id">#owo-big</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">    <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/* 动画效果代码由 Heo：https://blog.zhheo.com/ 提供 */</span></span><br><span class="line"><span class="keyword">@keyframes</span> owoIn &#123;</span><br><span class="line">    <span class="number">0%</span> &#123;</span><br><span class="line">        <span class="attribute">transform</span>: <span class="built_in">translate</span>(<span class="number">0</span>, -<span class="number">95%</span>);</span><br><span class="line">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="number">100%</span> &#123;</span><br><span class="line">        <span class="attribute">transform</span>: <span class="built_in">translate</span>(<span class="number">0</span>, -<span class="number">105%</span>);</span><br><span class="line">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="twikoo评论区设置气泡"><a href="#twikoo评论区设置气泡" class="headerlink" title="twikoo评论区设置气泡"></a>twikoo评论区设置气泡</h2><h3 id="css-1"><a href="#css-1" class="headerlink" title="css"></a>css</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.tk-content</span> <span class="selector-pseudo">:not</span>(pre) &gt; <span class="selector-tag">code</span><span class="selector-attr">[class*=<span class="string">&quot;language-&quot;</span>]</span>,</span><br><span class="line"><span class="selector-class">.tk-content</span> pre<span class="selector-attr">[class*=<span class="string">&quot;language-&quot;</span>]</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-action-count</span>,</span><br><span class="line"><span class="selector-class">.tk-nick</span>,</span><br><span class="line"><span class="selector-class">.tk-nick-link</span>,</span><br><span class="line"><span class="selector-class">.tk-nick-link</span> <span class="selector-tag">strong</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--cover-bg) <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="built_in">var</span>(--global-font-size);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-action-icon</span> svg &#123;</span><br><span class="line">  fill: <span class="built_in">var</span>(--cover-bg) <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-comments-container</span> &#123;</span><br><span class="line">  <span class="attribute">min-height</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-row</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: fit-content;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-avatar</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">3rem</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">3rem</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">0.5rem</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-avatar</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">3rem</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">3rem</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-avatar</span> &#123;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">  <span class="attribute">left</span>: <span class="built_in">calc</span>(<span class="number">100%</span> - <span class="number">3rem</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-comment</span> &#123;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">  <span class="attribute">max-width</span>: <span class="number">100%</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span> <span class="selector-tag">p</span>,</span><br><span class="line"><span class="selector-class">.tk-content</span> pre &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">white-space</span>: pre-wrap;</span><br><span class="line">  <span class="attribute">word-wrap</span>: break-word;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span> <span class="selector-tag">a</span><span class="selector-pseudo">:not</span>(<span class="selector-attr">[data-fancybox=<span class="string">&quot;gallery&quot;</span>]</span>) &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--second);</span><br><span class="line">  <span class="attribute">border-bottom</span>: solid <span class="number">2px</span> <span class="built_in">var</span>(--second);</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0.2rem</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span> <span class="selector-tag">a</span><span class="selector-pseudo">:not</span>(<span class="selector-attr">[data-fancybox=<span class="string">&quot;gallery&quot;</span>]</span>)<span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--main);</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--second);</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">4px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-content</span> <span class="selector-tag">a</span><span class="selector-pseudo">:not</span>(<span class="selector-attr">[data-fancybox=<span class="string">&quot;gallery&quot;</span>]</span>) &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--font-color);</span><br><span class="line">  <span class="attribute">border-bottom</span>: solid <span class="number">2px</span> <span class="built_in">var</span>(--main);</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0.2rem</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-content</span> <span class="selector-tag">a</span><span class="selector-pseudo">:not</span>(<span class="selector-attr">[data-fancybox=<span class="string">&quot;gallery&quot;</span>]</span>)<span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--second);</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--main);</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="number">4px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-comments-container</span> &gt; <span class="selector-class">.tk-comment</span> &#123;</span><br><span class="line">  <span class="attribute">border</span>: <span class="built_in">var</span>(--card-border);</span><br><span class="line">  <span class="attribute">border-width</span>: <span class="number">2px</span>;</span><br><span class="line">  <span class="attribute">border-style</span>: dashed;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">0.5rem</span> <span class="number">0.5rem</span> <span class="number">0.5rem</span>;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">0.95rem</span>;</span><br><span class="line">  -webkit-<span class="attribute">transition</span>: all <span class="number">0.3s</span>;</span><br><span class="line">  -moz-<span class="attribute">transition</span>: all <span class="number">0.3s</span>;</span><br><span class="line">  -o-<span class="attribute">transition</span>: all <span class="number">0.3s</span>;</span><br><span class="line">  -ms-<span class="attribute">transition</span>: all <span class="number">0.3s</span>;</span><br><span class="line">  <span class="attribute">transition</span>: all <span class="number">0.3s</span>;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">1rem</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-comments-container</span> &gt; <span class="selector-class">.tk-comment</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">border-color</span>: <span class="built_in">var</span>(--main);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--second);</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--main);</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0.5rem</span> <span class="number">1rem</span>;</span><br><span class="line">  <span class="attribute">margin-top</span>: <span class="number">0</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">95%</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">width</span>: fit-content;</span><br><span class="line">  <span class="attribute">max-width</span>: <span class="built_in">calc</span>(<span class="number">100%</span> - <span class="number">3rem</span>);</span><br><span class="line">  <span class="attribute">position</span>: relative <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">overflow</span>: visible <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">max-height</span>: none <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-replies</span> &#123;</span><br><span class="line">  <span class="attribute">left</span>: -<span class="number">4rem</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="built_in">calc</span>(<span class="number">100%</span> + <span class="number">4rem</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-content</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: <span class="built_in">var</span>(--font-color);</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--gjcloak-bg);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-content</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&quot;&quot;</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">10px</span>;</span><br><span class="line">  <span class="attribute">left</span>: -<span class="number">15px</span>;</span><br><span class="line">  <span class="attribute">border-top</span>: <span class="number">0</span> solid transparent;</span><br><span class="line">  <span class="attribute">border-bottom</span>: <span class="number">25px</span> solid transparent;</span><br><span class="line">  <span class="attribute">border-left</span>: <span class="number">0</span> solid transparent;</span><br><span class="line">  <span class="attribute">border-right</span>: <span class="number">15px</span> solid <span class="built_in">var</span>(--main);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-content</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">border-left</span>: <span class="number">15px</span> solid <span class="built_in">var</span>(--global-bg);</span><br><span class="line">  <span class="attribute">border-right</span>: <span class="number">0</span> solid transparent;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-content</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">4rem</span> <span class="number">0</span> auto;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-extras</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">3.5rem</span> <span class="number">0</span> auto;</span><br><span class="line">  <span class="attribute">width</span>: fit-content;</span><br><span class="line">  <span class="attribute">position</span>: relative;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-master</span> <span class="selector-class">.tk-row</span> &#123;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0</span> <span class="number">4rem</span> <span class="number">0</span> auto;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-expand</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">40%</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">margin</span>: <span class="number">0.5rem</span> auto <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--global-bg) <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.tk-expand</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">60%</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-id">#article-container</span> <span class="selector-class">.aplayer</span> &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius) <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line">::-webkit-scrollbar-thumb &#123;</span><br><span class="line">  <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--border-radius);</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">var</span>(--main);</span><br><span class="line">  <span class="attribute">background-image</span>: <span class="built_in">-webkit-linear-gradient</span>(</span><br><span class="line">    <span class="number">45deg</span>,</span><br><span class="line">    <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.4</span>) <span class="number">25%</span>,</span><br><span class="line">    transparent <span class="number">25%</span>,</span><br><span class="line">    transparent <span class="number">50%</span>,</span><br><span class="line">    <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.4</span>) <span class="number">50%</span>,</span><br><span class="line">    <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.4</span>) <span class="number">75%</span>,</span><br><span class="line">    transparent <span class="number">75%</span>,</span><br><span class="line">    transparent</span><br><span class="line">  );</span><br><span class="line">&#125;</span><br><span class="line">::-webkit-scrollbar-thumb:hover &#123;</span><br><span class="line">  <span class="attribute">background-image</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">body</span> &#123;</span><br><span class="line">  <span class="attribute">overflow-y</span>: overlay <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">body</span><span class="selector-class">.hidden-y</span> &#123;</span><br><span class="line">  <span class="attribute">overflow-y</span>: hidden <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-pseudo">:root</span> &#123;</span><br><span class="line">  <span class="attr">--theme-color</span>: <span class="number">#1677b3</span>;</span><br><span class="line">  <span class="attr">--global-bg</span>: <span class="number">#f2f6fc</span>;</span><br><span class="line">  <span class="attr">--gjcloak-bg</span>: <span class="number">#f15a5a</span>;</span><br><span class="line">  <span class="attr">--r</span>: <span class="number">22</span>;</span><br><span class="line">  <span class="attr">--g</span>: <span class="number">119</span>;</span><br><span class="line">  <span class="attr">--b</span>: <span class="number">179</span>;</span><br><span class="line">  <span class="attr">--main</span>: <span class="built_in">rgb</span>(<span class="built_in">var</span>(--r), <span class="built_in">var</span>(--g), <span class="built_in">var</span>(--b));</span><br><span class="line">  <span class="attr">--second</span>: <span class="built_in">var</span>(--white);</span><br><span class="line">  <span class="attr">--main-light</span>: <span class="built_in">rgba</span>(<span class="built_in">var</span>(--r), <span class="built_in">var</span>(--g), <span class="built_in">var</span>(--b), <span class="number">0.4</span>);</span><br><span class="line">  <span class="attr">--cover-bg</span>: <span class="built_in">rgb</span>(<span class="built_in">var</span>(--r), <span class="built_in">var</span>(--g), <span class="built_in">var</span>(--b));</span><br><span class="line">  <span class="attr">--main-light</span>: <span class="built_in">rgba</span>(<span class="built_in">var</span>(--r), <span class="built_in">var</span>(--g), <span class="built_in">var</span>(--b), <span class="number">0.4</span>);</span><br><span class="line">  <span class="attr">--main-shadow</span>: <span class="number">0</span> <span class="number">2px</span> <span class="number">3px</span> <span class="number">1px</span> <span class="built_in">rgba</span>(<span class="built_in">var</span>(--r), <span class="built_in">var</span>(--g), <span class="built_in">var</span>(--b), <span class="number">0.2</span>);</span><br><span class="line">  <span class="attr">--card-border</span>: <span class="number">1px</span> solid <span class="built_in">var</span>(--tab-botton-bg);</span><br><span class="line">  <span class="attr">--border-radius</span>: <span class="number">8px</span>;</span><br><span class="line">  <span class="attr">--light-text</span>: <span class="number">#ff7242</span>;</span><br><span class="line">  <span class="attr">--default-cursor</span>: <span class="built_in">url</span>(<span class="string">https://npm.elemecdn.com/eurkon-cdn/hexo/images/user/default.cur</span>);</span><br><span class="line">  <span class="attr">--pointer-cursor</span>: <span class="built_in">url</span>(<span class="string">https://npm.elemecdn.com/eurkon-cdn/hexo/images/user/pointer.cur</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.OwO</span> <span class="selector-class">.OwO-body</span>,</span><br><span class="line"><span class="selector-class">.OwO</span> <span class="selector-class">.OwO-body</span> <span class="selector-class">.OwO-bar</span> <span class="selector-class">.OwO-packages</span> <span class="selector-tag">li</span>,</span><br><span class="line"><span class="selector-class">.OwO</span> <span class="selector-class">.OwO-body</span> <span class="selector-class">.OwO-items</span> <span class="selector-class">.OwO-item</span>,</span><br><span class="line"><span class="selector-class">.tk-action-icon</span>,</span><br><span class="line"><span class="selector-class">.tk-expand</span>,</span><br><span class="line"><span class="selector-class">.tk-pagination-pager</span>,</span><br><span class="line"><span class="selector-class">.tk-panel</span> <span class="selector-class">.tk-tab</span> &#123;</span><br><span class="line">  <span class="attribute">cursor</span>: <span class="built_in">var</span>(--pointer-cursor), auto <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="为主页文章卡片添加擦亮动画效果"><a href="#为主页文章卡片添加擦亮动画效果" class="headerlink" title="为主页文章卡片添加擦亮动画效果"></a>为主页文章卡片添加擦亮动画效果</h2><blockquote><p>本教程来自<a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.kouseki.cn/posts/dda6.html">为主页文章卡片添加擦亮动画效果 | 铭心石刻 (kouseki.cn)</a></p></blockquote><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#recent-posts</span> &gt; <span class="selector-class">.recent-post-item</span><span class="selector-pseudo">:not</span>(<span class="selector-tag">a</span>)<span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&quot;&quot;</span>;</span><br><span class="line">  <span class="attribute">position</span>: absolute;</span><br><span class="line">  <span class="attribute">top</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">left</span>: <span class="number">0</span>;</span><br><span class="line">  <span class="attribute">width</span>: <span class="number">100%</span>;</span><br><span class="line">  <span class="attribute">height</span>: <span class="number">200%</span>;</span><br><span class="line">  <span class="attribute">background</span>: <span class="built_in">linear-gradient</span>(to right, transparent, white, transparent);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(-<span class="number">200%</span>);</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">0.5s</span> linear;</span><br><span class="line">  <span class="attribute">z-index</span>: <span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-id">#recent-posts</span> &gt; <span class="selector-class">.recent-post-item</span><span class="selector-pseudo">:not</span>(<span class="selector-tag">a</span>)<span class="selector-pseudo">:hover</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">translateX</span>(<span class="number">100%</span>) <span class="built_in">skewX</span>(-<span class="number">60deg</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="文章页展示top-img"><a href="#文章页展示top-img" class="headerlink" title="文章页展示top_img"></a>文章页展示top_img</h2><p><strong>\themes\anzhiyu\source\css_layout\head.styl</strong></p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">    #post-top-cover </span><br><span class="line">      width: 70%;</span><br><span class="line">      height: 100%;</span><br><span class="line">      position: relative;</span><br><span class="line">      margin: 0 -20% 0 auto;</span><br><span class="line">      overflow: hidden;</span><br><span class="line">      margin-bottom: 0;</span><br><span class="line">      user-select: none</span><br><span class="line">      transform: rotate(10deg) translateY(-10%) scale(var(--anzhiyu-header-cover-scale));</span><br><span class="line">      will-change: transform</span><br><span class="line">      if !hexo-config(&#x27;mainTone.enable&#x27;)</span><br><span class="line"><span class="deletion">-        filter: blur(10px) brightness(60%);</span></span><br><span class="line"><span class="addition">+        filter: blur(0) brightness(60%);</span></span><br><span class="line">        animation: none;</span><br><span class="line">        transition: filter 0s</span><br><span class="line">        margin: auto</span><br><span class="line">        width: auto</span><br><span class="line">        &amp;::after</span><br><span class="line">          display: none</span><br><span class="line">        img</span><br><span class="line">          border-radius: 0</span><br><span class="line">      else</span><br><span class="line">        filter: blur(10px);</span><br><span class="line">        +minWidth768()</span><br><span class="line">          animation: showCover 1s 0.3s backwards;</span><br><span class="line">          opacity 0.5</span><br></pre></td></tr></table></figure><h2 id="页脚：写了一本书"><a href="#页脚：写了一本书" class="headerlink" title="页脚：写了一本书"></a>页脚：写了一本书</h2><p><code>\themes\anzhiyu\layout\includes\footer.pug</code></p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br></pre></td><td class="code"><pre><span class="line">  - let work_img = theme.footer.runtime.work_img</span><br><span class="line">  - let work_description = theme.footer.runtime.work_description</span><br><span class="line">  if theme.footer.runtime.enable</span><br><span class="line">    #workboard</span><br><span class="line">      img(src=`$&#123;work_img&#125;`, alt=`$&#123;work_description&#125;`, title=`$&#123;work_description&#125;`, class=&quot;workSituationImg boardsign&quot;)</span><br><span class="line">      #runtimeTextTip</span><br><span class="line">  if theme.footer.custom_text</span><br><span class="line">    .footer_custom_text!=`$&#123;theme.footer.custom_text&#125;`</span><br><span class="line"><span class="addition">+  .wordcount</span></span><br><span class="line"><span class="addition">+  - let allword = totalcount(site)</span></span><br><span class="line"><span class="addition">+  span= &#x27;云少已经写了 &#x27; + allword + &#x27; 字，&#x27;</span></span><br><span class="line"><span class="addition">+  if isNaN(allword)</span></span><br><span class="line"><span class="addition">+    - allword= Number(allword.replace(&#x27;k&#x27;, &#x27;&#x27;))</span></span><br><span class="line"><span class="addition">+    if allword&lt; 50</span></span><br><span class="line"><span class="addition">+      span= &quot;还在努力更新中.. 加油！加油啦！&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 70</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 埃克苏佩里 的 《小王子》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 90</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 鲁迅 的 《呐喊》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 100</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 林海音 的 《城南旧事》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 110</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 马克·吐温 的 《王子与乞丐》了！ 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 120</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 鲁迅 的 《彷徨》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 130</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 余华 的 《活着》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 140</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 曹禺 的 《雷雨》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 150</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 史铁生 的 《宿命的写作》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 160</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 伯内特 的 《秘密花园》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 170</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 曹禺 的 《日出》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 180</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 马克·吐温 的 《汤姆·索亚历险记》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 190</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 沈从文 的 《边城》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 200</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 亚米契斯 的 《爱的教育》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 210</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 巴金 的 《寒夜》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 220</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 东野圭吾 的 《解忧杂货店》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 230</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 莫泊桑 的 《一生》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 250</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 简·奥斯汀 的 《傲慢与偏见》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 280</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 钱钟书 的 《围城》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 300</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 张炜 的 《古船》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 310</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 茅盾 的 《子夜》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 320</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 阿来 的 《尘埃落定》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 340</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 艾米莉·勃朗特 的 《呼啸山庄》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 350</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 雨果 的 《巴黎圣母院》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else if allword&lt; 360</span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本 东野圭吾 的 《白夜行》 了啊&quot;</span></span><br><span class="line"><span class="addition">+    else </span></span><br><span class="line"><span class="addition">+      span= &quot;好像写完一本我国著名的 四大名著 了！！！&quot;</span></span><br><span class="line"><span class="addition">+  else</span></span><br><span class="line"><span class="addition">+    span= &quot;还在努力更新中.. 加油！加油啦！&quot;</span></span><br><span class="line">  if theme.footer.bdageitem.enable</span><br><span class="line">    p#ghbdages</span><br><span class="line">      each item in theme.footer.bdageitem.list</span><br><span class="line">        a.github-badge(target=&#x27;_blank&#x27; href=item.link style=&#x27;margin-inline:5px&#x27; data-title=item.message title=item.message)</span><br><span class="line">          img(src=item.shields alt=item.message)</span><br></pre></td></tr></table></figure><h2 id="music默认歌单"><a href="#music默认歌单" class="headerlink" title="music默认歌单"></a>music默认歌单</h2><h3 id="方法一"><a href="#方法一" class="headerlink" title="方法一"></a>方法一</h3><p>**themes\anzhiyu\source\js\utils.js ** 803-804行</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> userId = <span class="string">&quot;8152976493&quot;</span>;</span><br><span class="line"><span class="keyword">const</span> userServer = <span class="string">&quot;netease&quot;</span>;</span><br></pre></td></tr></table></figure><h3 id="方法二"><a href="#方法二" class="headerlink" title="方法二"></a>方法二</h3><p><strong>_anzhiyu_config.yml</strong> CDN. option 这个地方写死</p><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">meting_api: https:</span> <span class="string">//meting-api.jinghuashang.cn/</span> <span class="string">?server=tencent&amp;type=playlist&amp;id=7527974808#prismjs_js:</span></span><br></pre></td></tr></table></figure><h2 id="博客背景切换-弹窗版"><a href="#博客背景切换-弹窗版" class="headerlink" title="博客背景切换-弹窗版"></a>博客背景切换-弹窗版</h2><blockquote><p>本教程出自<a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.leonus.cn/2022/bg2.html">博客背景切换-弹窗版 | Leonus</a></p></blockquote><h3 id="创建按钮"><a href="#创建按钮" class="headerlink" title="创建按钮"></a>创建按钮</h3><p>修改<code>anzhiyu\layout\includes\rightside.pug</code></p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">when &#x27;comment&#x27;</span><br><span class="line">    if commentsJsLoad</span><br><span class="line">        a#to_comment(href=&quot;#post-comment&quot; title=_p(&quot;rightside.scroll_to_comment&quot;))</span><br><span class="line">        i.fas.fa-comments</span><br><span class="line"><span class="addition">+ when &#x27;bg&#x27;</span></span><br><span class="line"><span class="addition">+     button(type=&quot;button&quot; title=&#x27;切换背景&#x27; onclick=&quot;toggleWinbox()&quot;)</span></span><br><span class="line"><span class="addition">+         i.fas.fa-display</span></span><br></pre></td></tr></table></figure><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">#rightside</span><br><span class="line">  - const &#123; enable, hide, show &#125; = theme.rightside_item_order</span><br><span class="line">  - const hideArray = enable ? hide &amp;&amp; hide.split(&#x27;,&#x27;) : [&#x27;readmode&#x27;,&#x27;translate&#x27;,&#x27;darkmode&#x27;,&#x27;hideAside&#x27;]</span><br><span class="line"><span class="deletion">-  - const showArray = enable ? show &amp;&amp; show.split(&#x27;,&#x27;) : [&#x27;toc&#x27;,&#x27;chat&#x27;,&#x27;comment&#x27;]</span></span><br><span class="line"><span class="addition">+  - const showArray = enable ? show &amp;&amp; show.split(&#x27;,&#x27;) : [&#x27;toc&#x27;,&#x27;chat&#x27;,&#x27;comment&#x27;,&#x27;bg&#x27;]</span></span><br></pre></td></tr></table></figure><h3 id="js-1"><a href="#js-1" class="headerlink" title="js"></a>js</h3><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 存数据</span></span><br><span class="line"><span class="comment">// name：命名 data：数据</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">saveData</span>(<span class="params">name, data</span>) &#123;</span><br><span class="line">    <span class="variable language_">localStorage</span>.<span class="title function_">setItem</span>(name, <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(&#123; <span class="string">&#x27;time&#x27;</span>: <span class="title class_">Date</span>.<span class="title function_">now</span>(), <span class="string">&#x27;data&#x27;</span>: data &#125;))</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 取数据</span></span><br><span class="line"><span class="comment">// name：命名 time：过期时长,单位分钟,如传入30,即加载数据时如果超出30分钟返回0,否则返回数据</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">loadData</span>(<span class="params">name, time</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> d = <span class="title class_">JSON</span>.<span class="title function_">parse</span>(<span class="variable language_">localStorage</span>.<span class="title function_">getItem</span>(name));</span><br><span class="line">    <span class="comment">// 过期或有错误返回 0 否则返回数据</span></span><br><span class="line">    <span class="keyword">if</span> (d) &#123;</span><br><span class="line">        <span class="keyword">let</span> t = <span class="title class_">Date</span>.<span class="title function_">now</span>() - d.<span class="property">time</span></span><br><span class="line">        <span class="keyword">if</span> (t &lt; (time * <span class="number">60</span> * <span class="number">1000</span>) &amp;&amp; t &gt; -<span class="number">1</span>) <span class="keyword">return</span> d.<span class="property">data</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 上面两个函数如果你有其他需要存取数据的功能，也可以直接使用</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 读取背景</span></span><br><span class="line"><span class="keyword">try</span> &#123;</span><br><span class="line">    <span class="keyword">let</span> data = <span class="title function_">loadData</span>(<span class="string">&#x27;blogbg&#x27;</span>, <span class="number">1440</span>)</span><br><span class="line">    <span class="keyword">if</span> (data) <span class="title function_">changeBg</span>(data, <span class="number">1</span>)</span><br><span class="line">    <span class="keyword">else</span> <span class="variable language_">localStorage</span>.<span class="title function_">removeItem</span>(<span class="string">&#x27;blogbg&#x27;</span>);</span><br><span class="line">&#125; <span class="keyword">catch</span> (error) &#123; <span class="variable language_">localStorage</span>.<span class="title function_">removeItem</span>(<span class="string">&#x27;blogbg&#x27;</span>); &#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 切换背景函数</span></span><br><span class="line"><span class="comment">// 此处的flag是为了每次读取时都重新存储一次,导致过期时间不稳定</span></span><br><span class="line"><span class="comment">// 如果flag为0则存储,即设置背景. 为1则不存储,即每次加载自动读取背景.</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">changeBg</span>(<span class="params">s, flag</span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> bg = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;web_bg&#x27;</span>)</span><br><span class="line">    <span class="keyword">if</span> (s.<span class="title function_">charAt</span>(<span class="number">0</span>) == <span class="string">&#x27;#&#x27;</span>) &#123;</span><br><span class="line">        bg.<span class="property">style</span>.<span class="property">backgroundColor</span> = s</span><br><span class="line">        bg.<span class="property">style</span>.<span class="property">backgroundImage</span> = <span class="string">&#x27;none&#x27;</span></span><br><span class="line">    &#125; <span class="keyword">else</span> bg.<span class="property">style</span>.<span class="property">backgroundImage</span> = s</span><br><span class="line">    <span class="keyword">if</span> (!flag) &#123; <span class="title function_">saveData</span>(<span class="string">&#x27;blogbg&#x27;</span>, s) &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 以下为2.0新增内容</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 创建窗口</span></span><br><span class="line"><span class="keyword">var</span> winbox = <span class="string">&#x27;&#x27;</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">createWinbox</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> div = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;div&#x27;</span>)</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">appendChild</span>(div)</span><br><span class="line">    winbox = <span class="title class_">WinBox</span>(&#123;</span><br><span class="line">        <span class="attr">id</span>: <span class="string">&#x27;changeBgBox&#x27;</span>,</span><br><span class="line">        <span class="attr">index</span>: <span class="number">999</span>,</span><br><span class="line">        <span class="attr">title</span>: <span class="string">&quot;切换背景&quot;</span>,</span><br><span class="line">        <span class="attr">x</span>: <span class="string">&quot;center&quot;</span>,</span><br><span class="line">        <span class="attr">y</span>: <span class="string">&quot;center&quot;</span>,</span><br><span class="line">        <span class="attr">minwidth</span>: <span class="string">&#x27;300px&#x27;</span>,</span><br><span class="line">        <span class="attr">height</span>: <span class="string">&quot;60%&quot;</span>,</span><br><span class="line">        <span class="attr">background</span>: <span class="string">&#x27;#49b1f5&#x27;</span>,</span><br><span class="line">        <span class="attr">onmaximize</span>: <span class="function">() =&gt;</span> &#123; div.<span class="property">innerHTML</span> = <span class="string">`&lt;style&gt;body::-webkit-scrollbar &#123;display: none;&#125;div#changeBgBox &#123;width: 100% !important;&#125;&lt;/style&gt;`</span> &#125;,</span><br><span class="line">        <span class="attr">onrestore</span>: <span class="function">() =&gt;</span> &#123; div.<span class="property">innerHTML</span> = <span class="string">&#x27;&#x27;</span> &#125;</span><br><span class="line">    &#125;);</span><br><span class="line">    <span class="title function_">winResize</span>();</span><br><span class="line">    <span class="variable language_">window</span>.<span class="title function_">addEventListener</span>(<span class="string">&#x27;resize&#x27;</span>, winResize)</span><br><span class="line"></span><br><span class="line">    <span class="comment">// 每一类我放了一个演示，直接往下复制粘贴 a标签 就可以，需要注意的是 函数里面的链接 冒号前面需要添加反斜杠\进行转义</span></span><br><span class="line">    winbox.<span class="property">body</span>.<span class="property">innerHTML</span> = <span class="string">`</span></span><br><span class="line"><span class="string">    &lt;div id=&quot;article-container&quot; style=&quot;padding:10px;&quot;&gt;</span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    &lt;p&gt;&lt;button onclick=&quot;localStorage.removeItem(&#x27;blogbg&#x27;);location.reload();&quot; style=&quot;background:#5fcdff;display:block;width:100%;padding: 15px 0;border-radius:6px;color:white;&quot;&gt;&lt;i class=&quot;fa-solid fa-arrows-rotate&quot;&gt;&lt;/i&gt; 点我恢复默认背景&lt;/button&gt;&lt;/p&gt;</span></span><br><span class="line"><span class="string">    &lt;h2 id=&quot;图片（手机）&quot;&gt;&lt;a href=&quot;#图片（手机）&quot; class=&quot;headerlink&quot; title=&quot;图片（手机）&quot;&gt;&lt;/a&gt;图片（手机）&lt;/h2&gt;</span></span><br><span class="line"><span class="string">    &lt;div class=&quot;bgbox&quot;&gt;</span></span><br><span class="line"><span class="string">    &lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; style=&quot;background-image:url(https://img.vm.laomishuo.com/image/2021/12/2021122715170589.jpeg)&quot; class=&quot;pimgbox&quot; onclick=&quot;changeBg(&#x27;url(https\://img.vm.laomishuo.com/image/2021/12/2021122715170589.jpeg)&#x27;)&quot;&gt;&lt;/a&gt;</span></span><br><span class="line"><span class="string">    &lt;/div&gt;</span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    &lt;h2 id=&quot;图片（电脑）&quot;&gt;&lt;a href=&quot;#图片（电脑）&quot; class=&quot;headerlink&quot; title=&quot;图片（电脑）&quot;&gt;&lt;/a&gt;图片（电脑）&lt;/h2&gt;</span></span><br><span class="line"><span class="string">    &lt;div class=&quot;bgbox&quot;&gt;</span></span><br><span class="line"><span class="string">    &lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; style=&quot;background-image:url(https://cn.bing.com/th?id=OHR.GBRTurtle_ZH-CN6069093254_1920x1080.jpg)&quot; class=&quot;imgbox&quot; onclick=&quot;changeBg(&#x27;url(https\://cn.bing.com/th?id=OHR.GBRTurtle_ZH-CN6069093254_1920x1080.jpg)&#x27;)&quot;&gt;&lt;/a&gt;</span></span><br><span class="line"><span class="string">    &lt;/div&gt;</span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    &lt;h2 id=&quot;渐变色&quot;&gt;&lt;a href=&quot;#渐变色&quot; class=&quot;headerlink&quot; title=&quot;渐变色&quot;&gt;&lt;/a&gt;渐变色&lt;/h2&gt;</span></span><br><span class="line"><span class="string">    &lt;div class=&quot;bgbox&quot;&gt;</span></span><br><span class="line"><span class="string">    &lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; class=&quot;box&quot; style=&quot;background: linear-gradient(to right, #eecda3, #ef629f)&quot; onclick=&quot;changeBg(&#x27;linear-gradient(to right, #eecda3, #ef629f)&#x27;)&quot;&gt;&lt;/a&gt;</span></span><br><span class="line"><span class="string">    &lt;/div&gt;</span></span><br><span class="line"><span class="string">    </span></span><br><span class="line"><span class="string">    &lt;h2 id=&quot;纯色&quot;&gt;&lt;a href=&quot;#纯色&quot; class=&quot;headerlink&quot; title=&quot;纯色&quot;&gt;&lt;/a&gt;纯色&lt;/h2&gt;</span></span><br><span class="line"><span class="string">    &lt;div class=&quot;bgbox&quot;&gt;</span></span><br><span class="line"><span class="string">    &lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; class=&quot;box&quot; style=&quot;background: #7D9D9C&quot; onclick=&quot;changeBg(&#x27;#7D9D9C&#x27;)&quot;&gt;&lt;/a&gt; </span></span><br><span class="line"><span class="string">    &lt;/div&gt;</span></span><br><span class="line"><span class="string">`</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 适应窗口大小</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">winResize</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">let</span> box = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&#x27;#changeBgBox&#x27;</span>)</span><br><span class="line">    <span class="keyword">if</span> (!box || box.<span class="property">classList</span>.<span class="title function_">contains</span>(<span class="string">&#x27;min&#x27;</span>) || box.<span class="property">classList</span>.<span class="title function_">contains</span>(<span class="string">&#x27;max&#x27;</span>)) <span class="keyword">return</span> <span class="comment">// 2023-02-10更新</span></span><br><span class="line">    <span class="keyword">var</span> offsetWid = <span class="variable language_">document</span>.<span class="property">documentElement</span>.<span class="property">clientWidth</span>;</span><br><span class="line">    <span class="keyword">if</span> (offsetWid &lt;= <span class="number">768</span>) &#123;</span><br><span class="line">        winbox.<span class="title function_">resize</span>(offsetWid * <span class="number">0.95</span> + <span class="string">&quot;px&quot;</span>, <span class="string">&quot;90%&quot;</span>).<span class="title function_">move</span>(<span class="string">&quot;center&quot;</span>, <span class="string">&quot;center&quot;</span>);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        winbox.<span class="title function_">resize</span>(offsetWid * <span class="number">0.6</span> + <span class="string">&quot;px&quot;</span>, <span class="string">&quot;70%&quot;</span>).<span class="title function_">move</span>(<span class="string">&quot;center&quot;</span>, <span class="string">&quot;center&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 切换状态，窗口已创建则控制窗口显示和隐藏，没窗口则创建窗口</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">toggleWinbox</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&#x27;#changeBgBox&#x27;</span>)) winbox.<span class="title function_">toggleClass</span>(<span class="string">&#x27;hide&#x27;</span>);</span><br><span class="line">    <span class="keyword">else</span> <span class="title function_">createWinbox</span>();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h3 id="css-2"><a href="#css-2" class="headerlink" title="css"></a>css</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 由于全屏会出bug，所以直接给他隐藏 */</span></span><br><span class="line"></span><br><span class="line"><span class="selector-class">.winbox</span> &#123;</span><br><span class="line">    <span class="attribute">border-radius</span>: <span class="number">12px</span>;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.wb-full</span> &#123;</span><br><span class="line">    <span class="attribute">display</span>: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.wb-min</span> &#123;</span><br><span class="line">    <span class="attribute">background-position</span>: center;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-class">.wb-body</span>,</span><br><span class="line"><span class="selector-attr">[data-theme=<span class="string">&#x27;dark&#x27;</span>]</span> <span class="selector-id">#changeBgBox</span> &#123;</span><br><span class="line">    <span class="attribute">background</span>: <span class="number">#333</span> <span class="meta">!important</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.bgbox</span> &#123;</span><br><span class="line">    <span class="attribute">display</span>: flex;</span><br><span class="line">    <span class="attribute">flex-wrap</span>: wrap;</span><br><span class="line">    <span class="attribute">justify-content</span>: space-between;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.pimgbox</span>,</span><br><span class="line"><span class="selector-class">.imgbox</span>,</span><br><span class="line"><span class="selector-class">.box</span> &#123;</span><br><span class="line">    <span class="attribute">width</span>: <span class="number">166px</span>;</span><br><span class="line">    <span class="attribute">margin</span>: <span class="number">10px</span>;</span><br><span class="line">    <span class="attribute">background-size</span>: cover</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.pimgbox</span>,</span><br><span class="line"><span class="selector-class">.imgbox</span> &#123;</span><br><span class="line">    <span class="attribute">border-radius</span>: <span class="number">10px</span>;</span><br><span class="line">    <span class="attribute">overflow</span>: hidden;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.pimgbox</span> &#123;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">240px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.imgbox</span> &#123;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">95px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.box</span> &#123;</span><br><span class="line">    <span class="attribute">height</span>: <span class="number">100px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width</span>: <span class="number">768px</span>) &#123;</span><br><span class="line">    <span class="comment">/* 背景 */</span></span><br><span class="line">    <span class="selector-class">.pimgbox</span>,</span><br><span class="line">    <span class="selector-class">.imgbox</span>,</span><br><span class="line">    <span class="selector-class">.box</span> &#123;</span><br><span class="line">        <span class="attribute">height</span>: <span class="number">73px</span>;</span><br><span class="line">        <span class="attribute">width</span>: <span class="number">135px</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="selector-class">.pimgbox</span> &#123;</span><br><span class="line">        <span class="attribute">height</span>: <span class="number">205px</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/* 2.0新增内容 */</span>    </span><br><span class="line">    <span class="selector-class">.wb-min</span> &#123;</span><br><span class="line">        <span class="attribute">display</span>: none;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="selector-id">#changeBgBox</span> <span class="selector-class">.wb-body</span>::-webkit-scrollbar &#123;</span><br><span class="line">        <span class="attribute">display</span>: none;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h3 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h3><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">inject:</span></span><br><span class="line">  <span class="attr">head:</span></span><br><span class="line">	<span class="bullet">-</span> <span class="string">&lt;link</span> <span class="string">rel=&quot;stylesheet&quot;</span> <span class="string">href=&quot;xxx.css&quot;&gt;</span></span><br><span class="line">  <span class="attr">bottom:</span></span><br><span class="line">    <span class="comment">#winbox</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;https://cdn.jsdelivr.net/gh/nextapps-de/winbox/dist/winbox.bundle.min.js&quot;&gt;&lt;/script&gt;</span> <span class="comment"># 添加此行</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&lt;script</span> <span class="string">src=&quot;xxx.js&quot;&gt;&lt;/script&gt;</span> <span class="comment"># 这个代表自定义js，放在最下面</span></span><br></pre></td></tr></table></figure><h3 id="附带"><a href="#附带" class="headerlink" title="附带"></a>附带</h3><h4 id="渐变色"><a href="#渐变色" class="headerlink" title="渐变色"></a>渐变色</h4><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> random</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">generate_gradient</span>():</span><br><span class="line">    color1 = generate_color()</span><br><span class="line">    color2 = generate_color()</span><br><span class="line">    <span class="keyword">return</span> <span class="string">f&quot;linear-gradient(to right, <span class="subst">&#123;color1&#125;</span>, <span class="subst">&#123;color2&#125;</span>)&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">generate_color</span>():</span><br><span class="line">    r = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    g = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    b = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    <span class="keyword">return</span> <span class="string">f&quot;#<span class="subst">&#123;r:02x&#125;</span><span class="subst">&#123;g:02x&#125;</span><span class="subst">&#123;b:02x&#125;</span>&quot;</span></span><br><span class="line"></span><br><span class="line">gradients = [generate_gradient() <span class="keyword">for</span> _ <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">20</span>)]</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> gradient <span class="keyword">in</span> gradients:</span><br><span class="line">    output = <span class="string">f&#x27;&lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; class=&quot;box&quot; style=&quot;background: <span class="subst">&#123;gradient&#125;</span>&quot; onclick=&quot;changeBg(\&#x27;<span class="subst">&#123;gradient&#125;</span>\&#x27;)&quot;&gt;&lt;/a&gt;&#x27;</span></span><br><span class="line">    <span class="built_in">print</span>(output)</span><br><span class="line"></span><br></pre></td></tr></table></figure><h4 id="纯色"><a href="#纯色" class="headerlink" title="纯色"></a>纯色</h4><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> random</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">generate_color</span>():</span><br><span class="line">    r = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    g = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    b = random.randint(<span class="number">0</span>, <span class="number">255</span>)</span><br><span class="line">    <span class="keyword">return</span> <span class="string">f&quot;#<span class="subst">&#123;r:02x&#125;</span><span class="subst">&#123;g:02x&#125;</span><span class="subst">&#123;b:02x&#125;</span>&quot;</span></span><br><span class="line"></span><br><span class="line">colors = [generate_color() <span class="keyword">for</span> _ <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">20</span>)]</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> color <span class="keyword">in</span> colors:</span><br><span class="line">    output = <span class="string">f&#x27;&lt;a href=&quot;javascript:;&quot; rel=&quot;noopener external nofollow&quot; class=&quot;box&quot; style=&quot;background: <span class="subst">&#123;color&#125;</span>&quot; onclick=&quot;changeBg(\&#x27;<span class="subst">&#123;color&#125;</span>\&#x27;)&quot;&gt;&lt;/a&gt;&#x27;</span></span><br><span class="line">    <span class="built_in">print</span>(output)</span><br><span class="line"></span><br></pre></td></tr></table></figure></article><div class="post-copyright"><div class="copyright-cc-box"><i class="anzhiyufont anzhiyu-icon-copyright"></i></div><div class="post-copyright__author_box"><a class="post-copyright__author_img" href="/" title="头像"><img class="post-copyright__author_img_back" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://q1.qlogo.cn/g?b=qq&amp;nk=2071916845&amp;s=640" title="头像" alt="头像"><img class="post-copyright__author_img_front" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://q1.qlogo.cn/g?b=qq&amp;nk=2071916845&amp;s=640" title="头像" alt="头像"></a><div class="post-copyright__author_name">云少</div><div class="post-copyright__author_desc">站在巨人的肩膀罢了</div></div><div class="post-copyright__post__info"><a class="post-copyright__original" title="该文章为原创文章，注意版权协议" href="https://it985.github.io/posts/3ec6e747.html">原创</a><a class="post-copyright-title"><span onclick='rm.copyPageUrl("https://it985.github.io/posts/3ec6e747.html")'>hexo主题魔改备忘录</span></a></div><div class="post-tools" id="post-tools"><div class="post-tools-left"><div class="rewardLeftButton"><div class="post-reward" onclick="anzhiyu.addRewardMask()"><div class="reward-button button--animated" title="赞赏作者"><i class="anzhiyufont anzhiyu-icon-hand-heart-fill"></i>打赏作者</div><div class="reward-main"><div class="reward-all"><span class="reward-title">感谢你赐予我前进的力量</span><ul class="reward-group"><li class="reward-item"><a href="/img/wxpay.webp" target="_blank"><img class="post-qr-code-img" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="/img/wxpay.webp" alt="wechat"></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/alipay.webp" target="_blank"><img class="post-qr-code-img" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="/img/alipay.webp" alt="alipay"></a><div class="post-qr-code-desc">alipay</div></li></ul><a class="reward-main-btn" href="/about/#about-reward" target="_blank"><div class="reward-text">赞赏者名单</div><div class="reward-dec">因为你们的支持让我意识到写文章的价值🙏</div></a></div></div></div><div id="quit-box" onclick="anzhiyu.removeRewardMask()" style="display:none"></div></div><div class="shareRight"><div class="share-link mobile"><div class="share-qrcode"><div class="share-button" title="使用手机访问这篇文章"><i class="anzhiyufont anzhiyu-icon-qrcode"></i></div><div class="share-main"><div class="share-main-all"><div id="qrcode" title="https://it985.github.io/posts/3ec6e747.html"></div><div class="reward-dec">使用手机访问这篇文章</div></div></div></div></div><div class="share-link weibo"><a class="share-button" target="_blank" href="https://service.weibo.com/share/share.php?title=hexo主题魔改备忘录&amp;url=https://it985.github.io/posts/3ec6e747.html&amp;pic=https://cn.bing.com/th?id=OHR.MountNemrut_ZH-CN4681788604_UHD.jpg" rel="external nofollow noreferrer noopener"><i class="anzhiyufont anzhiyu-icon-weibo"></i></a></div><div class="share-link copyurl"><div class="share-button" id="post-share-url" title="复制链接" onclick="rm.copyPageUrl()"><i class="anzhiyufont anzhiyu-icon-link"></i></div></div></div></div></div><div class="post-copyright__notice"><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://it985.github.io" target="_blank">云少IT</a>！</span></div></div><div class="post-tools-right"><div class="tag_share"><div class="post-meta__box"><div class="post-meta__box__tag-list"></div></div><div class="post_share"><div class="social-share" data-image="https://img02.anheyu.com/adminuploads/1/2022/09/05/6315e146a8bbd.webp" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.cbd.int/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload='this.media="all"'><script src="https://cdn.cbd.int/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/dcf5c100.html"><img class="prev-cover" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://www.bing.com/th?id=OHR.BrockenSpecter_EN-IN4945372418_UHD.jpg" onerror='onerror=null,src="/img/404.jpg"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">十、Tomcat8源码分析系列-关于tomcat热加载的一些思考</div></div></a></div><div class="next-post pull-right"><a href="/posts/3c10e972.html"><img class="next-cover" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://cn.bing.com/th?id=OHR.VosgesBioReserve_ZH-CN4762694302_UHD.jpg" onerror='onerror=null,src="/img/404.jpg"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">github搜索正确使用方法</div></div></a></div></nav><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="anzhiyufont anzhiyu-icon-comments"></i><span> 评论</span></div><div class="comment-randomInfo"><a onclick="anzhiyu.addRandomCommentInfo()" href="javascript:void(0)" rel="external nofollow noreferrer">匿名评论</a><a href="/privacy" style="margin-left:4px">隐私政策</a></div><div class="comment-switch"><span class="first-comment">Twikoo</span><span id="switch-btn"></span><span class="second-comment">Artalk</span></div><div class="comment-tips" id="comment-tips"><span>✅ 你无需删除空行，直接评论以获取最佳展示效果</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div><div><div id="artalk-wrap"></div></div></div></div><div class="comment-barrage"></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="anzhiyufont anzhiyu-icon-bars"></i><span>文章目录</span><span class="toc-percentage"></span></div><div class="toc-content is-expand"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#hexo%E4%B8%BB%E9%A2%98%E9%AD%94%E6%94%B9%E5%A4%87%E5%BF%98%E5%BD%95"><span class="toc-number">1.</span> <span class="toc-text">hexo主题魔改备忘录</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Hexo-%E5%8D%9A%E5%AE%A2%E6%96%87%E7%AB%A0%E7%BB%9F%E8%AE%A1%E5%9B%BE"><span class="toc-number">1.1.</span> <span class="toc-text">Hexo 博客文章统计图</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B0%E5%BB%BA%E9%A1%B5%E9%9D%A2"><span class="toc-number">1.1.1.</span> <span class="toc-text">新建页面</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BC%95%E5%85%A5-ECharts-js"><span class="toc-number">1.1.2.</span> <span class="toc-text">引入 ECharts.js</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E9%A1%B5%E9%9D%A2%E5%BC%95%E5%85%A5"><span class="toc-number">1.1.2.1.</span> <span class="toc-text">页面引入</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%85%A8%E5%B1%80%E5%BC%95%E5%85%A5"><span class="toc-number">1.1.2.2.</span> <span class="toc-text">全局引入</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E7%BB%9F%E8%AE%A1%E4%BB%A3%E7%A0%81"><span class="toc-number">1.1.3.</span> <span class="toc-text">文章统计代码</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E7%BB%9F%E8%AE%A1%E5%9B%BE"><span class="toc-number">1.1.4.</span> <span class="toc-text">使用统计图</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%97%8F%E5%AE%9D%E9%98%81%E9%A1%B5%E9%9D%A2%E7%9A%84%E5%AE%9E%E7%8E%B0"><span class="toc-number">1.2.</span> <span class="toc-text">藏宝阁页面的实现</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-%E4%BF%AE%E6%94%B9page-pug"><span class="toc-number">1.2.1.</span> <span class="toc-text">1.修改page.pug</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2"><span class="toc-number">1.2.2.</span> <span class="toc-text">2</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%B8%80%EF%BC%9A"><span class="toc-number">1.2.2.1.</span> <span class="toc-text">方法一：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%BA%8C%EF%BC%9A"><span class="toc-number">1.2.2.2.</span> <span class="toc-text">方法二：</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3"><span class="toc-number">1.2.3.</span> <span class="toc-text">3</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%B8%80%EF%BC%9A%E6%96%B0%E5%BB%BAcollect-styl"><span class="toc-number">1.2.3.1.</span> <span class="toc-text">方法一：新建collect.styl</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%BA%8C%EF%BC%9A%E8%87%AA%E5%AE%9A%E4%B9%89css%E6%96%87%E4%BB%B6"><span class="toc-number">1.2.3.2.</span> <span class="toc-text">方法二：自定义css文件</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%A2%9E%E5%8A%A0%E8%BE%85%E5%8A%A9%E5%87%BD%E6%95%B0"><span class="toc-number">1.2.4.</span> <span class="toc-text">增加辅助函数</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B0%E5%BB%BAcollect-yml"><span class="toc-number">1.2.5.</span> <span class="toc-text">新建collect.yml</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%97%A5%E5%AD%90%E4%B8%AD%E8%87%AA%E5%8A%A8%E5%BC%B9%E7%AA%97-%E7%81%B0%E5%B1%8F"><span class="toc-number">1.3.</span> <span class="toc-text">日子中自动弹窗&#x2F;灰屏</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B9%E6%A1%88%E4%B8%80"><span class="toc-number">1.3.1.</span> <span class="toc-text">方案一</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#day-js"><span class="toc-number">1.3.1.1.</span> <span class="toc-text">day.js</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#lunar-js"><span class="toc-number">1.3.1.2.</span> <span class="toc-text">lunar.js</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#SweetAlert-js"><span class="toc-number">1.3.1.3.</span> <span class="toc-text">SweetAlert.js</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84-inject%E9%87%8C%E9%9D%A2%E5%BC%95%E5%85%A5"><span class="toc-number">1.3.1.4.</span> <span class="toc-text">主题配置文件的 inject里面引入</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B9%E6%A1%88%E4%BA%8C"><span class="toc-number">1.3.2.</span> <span class="toc-text">方案二</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AF%84%E8%AE%BA%E8%A1%A8%E6%83%85%E5%8C%85%E6%94%BE%E5%A4%A7%E5%8A%9F%E8%83%BD%EF%BC%8C%E8%B6%85%E5%AE%9E%E7%94%A8"><span class="toc-number">1.4.</span> <span class="toc-text">评论表情包放大功能，超实用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#js"><span class="toc-number">1.4.1.</span> <span class="toc-text">js</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#css"><span class="toc-number">1.4.2.</span> <span class="toc-text">css</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#twikoo%E8%AF%84%E8%AE%BA%E5%8C%BA%E8%AE%BE%E7%BD%AE%E6%B0%94%E6%B3%A1"><span class="toc-number">1.5.</span> <span class="toc-text">twikoo评论区设置气泡</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#css-1"><span class="toc-number">1.5.1.</span> <span class="toc-text">css</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BA%E4%B8%BB%E9%A1%B5%E6%96%87%E7%AB%A0%E5%8D%A1%E7%89%87%E6%B7%BB%E5%8A%A0%E6%93%A6%E4%BA%AE%E5%8A%A8%E7%94%BB%E6%95%88%E6%9E%9C"><span class="toc-number">1.6.</span> <span class="toc-text">为主页文章卡片添加擦亮动画效果</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E9%A1%B5%E5%B1%95%E7%A4%BAtop-img"><span class="toc-number">1.7.</span> <span class="toc-text">文章页展示top_img</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A1%B5%E8%84%9A%EF%BC%9A%E5%86%99%E4%BA%86%E4%B8%80%E6%9C%AC%E4%B9%A6"><span class="toc-number">1.8.</span> <span class="toc-text">页脚：写了一本书</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#music%E9%BB%98%E8%AE%A4%E6%AD%8C%E5%8D%95"><span class="toc-number">1.9.</span> <span class="toc-text">music默认歌单</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%B8%80"><span class="toc-number">1.9.1.</span> <span class="toc-text">方法一</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E4%BA%8C"><span class="toc-number">1.9.2.</span> <span class="toc-text">方法二</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%9A%E5%AE%A2%E8%83%8C%E6%99%AF%E5%88%87%E6%8D%A2-%E5%BC%B9%E7%AA%97%E7%89%88"><span class="toc-number">1.10.</span> <span class="toc-text">博客背景切换-弹窗版</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%9B%E5%BB%BA%E6%8C%89%E9%92%AE"><span class="toc-number">1.10.1.</span> <span class="toc-text">创建按钮</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#js-1"><span class="toc-number">1.10.2.</span> <span class="toc-text">js</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#css-2"><span class="toc-number">1.10.3.</span> <span class="toc-text">css</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BC%95%E7%94%A8"><span class="toc-number">1.10.4.</span> <span class="toc-text">引用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%99%84%E5%B8%A6"><span class="toc-number">1.10.5.</span> <span class="toc-text">附带</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%B8%90%E5%8F%98%E8%89%B2"><span class="toc-number">1.10.5.1.</span> <span class="toc-text">渐变色</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E7%BA%AF%E8%89%B2"><span class="toc-number">1.10.5.2.</span> <span class="toc-text">纯色</span></a></li></ol></li></ol></li></ol></li></ol></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div id="footer_deal"><a class="deal_link" href="mailto:2071916845@qq.com" rel="external nofollow noreferrer" title="email"><i class="anzhiyufont anzhiyu-icon-envelope"></i></a><a class="deal_link" target="_blank" rel="noopener external nofollow noreferrer" href="https://weibo.com/" title="微博"><i class="anzhiyufont anzhiyu-icon-weibo"></i></a><a class="deal_link" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.facebook.com/" title="facebook"><i class="anzhiyufont anzhiyu-icon-facebook1"></i></a><a class="deal_link" href="/atom.xml" title="RSS"><i class="anzhiyufont anzhiyu-icon-rss"></i></a><img class="footer_mini_logo" title="返回顶部" alt="返回顶部" onclick="anzhiyu.scrollToDest(0,500)" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://q1.qlogo.cn/g?b=qq&amp;nk=2071916845&amp;s=640" size="50px"><a class="deal_link" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/it985" title="Github"><i class="anzhiyufont anzhiyu-icon-github"></i></a><a class="deal_link" target="_blank" rel="noopener external nofollow noreferrer" href="https://space.bilibili.com/300767383" title="Bilibili"><i class="anzhiyufont anzhiyu-icon-bilibili"></i></a><a class="deal_link" target="_blank" rel="noopener external nofollow noreferrer" href="https://v.douyin.com/" title="抖音"><i class="anzhiyufont anzhiyu-icon-tiktok"></i></a><a class="deal_link" href="/copyright" title="CC"><i class="anzhiyufont anzhiyu-icon-copyright-line"></i></a></div><div id="anzhiyu-footer"><div class="footer-group"><div class="footer-title">服务</div><div class="footer-links"><a class="footer-item" title="51la统计" target="_blank" rel="noopener external nofollow noreferrer" href="https://v6.51.la/">51la统计</a><a class="footer-item" title="十年之约" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.foreverblog.cn/">十年之约</a><a class="footer-item" title="开往" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/travellings-link/travellings">开往</a></div></div><div class="footer-group"><div class="footer-title">导航</div><div class="footer-links"><a class="footer-item" title="即刻短文" href="/essay/">即刻短文</a><a class="footer-item" title="友链文章" href="/fcircle/">友链文章</a><a class="footer-item" title="留言板" href="/comments/">留言板</a></div></div><div class="footer-group"><div class="footer-title">协议</div><div class="footer-links"><a class="footer-item" title="免责声明" href="/disclaimer/">免责声明</a><a class="footer-item" title="隐私协议" href="/privacy/">隐私协议</a><a class="footer-item" title="Cookies" href="/cookies/">Cookies</a><a class="footer-item" title="版权协议" href="/copyright/">版权协议</a></div></div><div class="footer-group"><div class="footer-title">娱乐</div><div class="footer-links"><a class="footer-item" title="小空调" href="/air-conditioner/">小空调</a><a class="footer-item" title="围住小猫" href="/catch-cat/">围住小猫</a><a class="footer-item" title="免费图床" href="/huluxiapicture/">免费图床</a></div></div><div class="footer-group"><div class="footer-title">推荐分类</div><div class="footer-links"><a class="footer-item" title="Java" href="/categories/Java/">Java</a><a class="footer-item" title="面试" href="/categories/%E9%9D%A2%E8%AF%95/">面试</a></div></div><div class="footer-group"><div class="footer-title-group"><div class="footer-title">友链</div><a class="random-friends-btn" id="footer-random-friends-btn" href="javascript:addFriendLinksInFooter();" rel="external nofollow noreferrer" title="换一批友情链接"><i class="anzhiyufont anzhiyu-icon-arrow-rotate-right"></i></a></div><div class="footer-links" id="friend-links-in-footer"></div></div></div><div id="workboard"><img class="workSituationImg boardsign" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://npm.elemecdn.com/anzhiyu-blog@2.0.4/img/badge/安知鱼-上班摸鱼中.svg" alt="距离月入25k也就还差一个大佬带我~" title="距离月入25k也就还差一个大佬带我~"><div id="runtimeTextTip"></div></div><div class="wordcount"></div><span>云少已经写了 996.7k 字，</span><span>好像写完一本我国著名的 四大名著 了！！！</span><p id="ghbdages"><a class="github-badge" target="_blank" href="https://hexo.io/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="博客框架为Hexo_v5.4.0" title="博客框架为Hexo_v5.4.0"><img src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://npm.elemecdn.com/anzhiyu-blog@2.1.5/img/badge/Frame-Hexo.svg" alt="博客框架为Hexo_v5.4.0"></a><a class="github-badge" target="_blank" href="https://www.upyun.com/?utm_source=lianmeng&amp;utm_medium=referral" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站使用又拍云为静态资源提供CDN加速" title="本站使用又拍云为静态资源提供CDN加速"><img src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://img.shields.io/badge/CDN-%E5%8F%88%E6%8B%8D%E4%BA%91-orange%3Fstyle%3Dflat%26logo%3D%E5%8F%88%E6%8B%8D%E4%BA%91" alt="本站使用又拍云为静态资源提供CDN加速"></a><a class="github-badge" target="_blank" href="https://github.com/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站项目由Github托管" title="本站项目由Github托管"><img src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://npm.elemecdn.com/anzhiyu-blog@2.1.5/img/badge/Source-Github.svg" alt="本站项目由Github托管"></a><a class="github-badge" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"><img src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://npm.elemecdn.com/anzhiyu-blog@2.2.0/img/badge/Copyright-BY-NC-SA.svg" alt="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"></a><a class="github-badge" target="_blank" href="https://icp.gov.moe/?keyword=20221607" rel="external nofollow noreferrer" style="margin-inline:5px" data-title="萌ICP备20221607号" title="萌ICP备20221607号"><img src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://img.shields.io/badge/%E8%90%8CICP%E5%A4%87-20221607-fe1384?style-flat&amp;logo=" alt="萌ICP备20221607号"></a></p></div><div id="footer-bar"><div class="footer-bar-links"><div class="footer-bar-left"><div id="footer-bar-tips"><div class="copyright">&copy;2018 - 2023 By <a class="footer-bar-link" href="/" title="云少" target="_blank">云少</a></div></div><div id="footer-type-tips"></div><div class="js-pjax"><script>function subtitleType(){fetch("https://v1.hitokoto.cn").then(t=>t.json()).then(t=>{var e="出自 "+t.from,p=[];p.unshift(t.hitokoto,e),window.typed=new Typed("#footer-type-tips",{strings:p,startDelay:300,typeSpeed:150,loop:!0,backSpeed:50})})}"function"==typeof Typed?subtitleType():getScript("https://cdn.cbd.int/typed.js@2.0.15/dist/typed.umd.js").then(subtitleType)</script></div></div><div class="footer-bar-right"><a class="footer-bar-link" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.tryrun.top" title="云少">云少</a><a class="footer-bar-link" target="_blank" rel="noopener external nofollow noreferrer" href="https://beian.miit.gov.cn/" title="鄂ICP备2021021095号-2">鄂ICP备2021021095号-2</a><a class="footer-bar-link cc" href="/copyright" title="cc协议"><i class="anzhiyufont anzhiyu-icon-copyright-line"></i><i class="anzhiyufont anzhiyu-icon-creative-commons-by-line"></i><i class="anzhiyufont anzhiyu-icon-creative-commons-nc-line"></i><i class="anzhiyufont anzhiyu-icon-creative-commons-nd-line"></i></a></div></div></div></footer></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="sidebar-site-data site-data is-center"><a href="/archives/" title="archive"><div class="headline">文章</div><div class="length-num">861</div></a><a href="/tags/" title="tag"><div class="headline">标签</div><div class="length-num">35</div></a><a href="/categories/" title="category"><div class="headline">分类</div><div class="length-num">6</div></a></div><span class="sidebar-menu-item-title">功能</span><div class="sidebar-menu-item"><a class="darkmode_switchbutton menu-child" href="javascript:void(0);" rel="external nofollow noreferrer" title="显示模式"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i><span>显示模式</span></a></div><div class="back-menu-list-groups"><div class="back-menu-list-group"><div class="back-menu-list-title">网页</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.tryrun.top/" title="博客"><img class="back-menu-item-icon" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="/img/favicon.ico" alt="博客"><span class="back-menu-item-text">博客</span></a></div></div><div class="back-menu-list-group"><div class="back-menu-list-title">项目</div><div class="back-menu-list"><a class="back-menu-item" target="_blank" rel="noopener external nofollow noreferrer" href="https://www.tryrun.top" title="图床"><img class="back-menu-item-icon" src= "" onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" data-lazy-src="https://www.tryrun.top/favicon.ico" alt="图床"><span class="back-menu-item-text">图床</span></a></div></div></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>望四方</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><i class="anzhiyufont anzhiyu-icon-box-archive faa-tada" style="font-size:.9em"></i><span> 归名档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><i class="anzhiyufont anzhiyu-icon-shapes faa-tada" style="font-size:.9em"></i><span> 归四类</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags faa-tada" style="font-size:.9em"></i><span> 书中签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/charts/"><i class="fa-fw fas fa-chart-bar faa-tada"></i><span> 统计</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>友链</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><i class="anzhiyufont anzhiyu-icon-link faa-tada" style="font-size:.9em"></i><span> 四方好友</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/fcircle/"><i class="anzhiyufont anzhiyu-icon-artstation faa-tada" style="font-size:.9em"></i><span> 朋友圈</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/comments/"><i class="anzhiyufont anzhiyu-icon-envelope faa-tada" style="font-size:.9em"></i><span> 留言板</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>我的</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/bangumis/"><i class="anzhiyufont anzhiyu-icon-bilibili faa-tada" style="font-size:.9em"></i><span> 追番页</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/album/"><i class="anzhiyufont anzhiyu-icon-images faa-tada" style="font-size:.9em"></i><span> 刹那间</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/equipment/"><i class="fas fa-heart faa-tada"></i><span> 我的装备</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/collect/"><i class="fas fa-camcorder faa-tada"></i><span> 观影阁</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);" rel="external nofollow noreferrer"><span>关于</span></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/about/"><i class="anzhiyufont anzhiyu-icon-paper-plane faa-tada" style="font-size:.9em"></i><span> 关于本人</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/essay/"><i class="anzhiyufont anzhiyu-icon-lightbulb faa-tada" style="font-size:.9em"></i><span> 闲言碎语</span></a></li><li><a class="site-page child faa-parent animated-hover" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-shoe-prints1 faa-tada" style="font-size:.9em"></i><span> 随便逛逛</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/disclaimer/"><i class="fas fa-heart faa-tada"></i><span> 免责声明</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/love/"><i class="anzhiyufont anzhiyu-icon-heartbeat faa-tada" style="font-size:.9em"></i><span> 恋爱小屋</span></a></li></ul></div></div><span class="sidebar-menu-item-title">标签</span><div class="card-tags"><div class="item-headline"></div><div class="card-tag-cloud"><a href="/tags/API/" style="font-size:.88rem;color:#758692">API<sup>43</sup></a><a href="/tags/Base64/" style="font-size:.88rem;color:#2584bf">Base64<sup>1</sup></a><a href="/tags/Collectors/" style="font-size:.88rem;color:#bfad3e">Collectors<sup>3</sup></a><a href="/tags/Date/" style="font-size:.88rem;color:#b9b609">Date<sup>3</sup></a><a href="/tags/Executor/" style="font-size:.88rem;color:#14c83c">Executor<sup>9</sup></a><a href="/tags/Guava/" style="font-size:.88rem;color:#0a1878">Guava<sup>1</sup></a><a href="/tags/JVM/" style="font-size:.88rem;color:#625421">JVM<sup>8</sup></a><a href="/tags/Java8/" style="font-size:.88rem;color:#aa71bf">Java8<sup>21</sup></a><a href="/tags/Java9/" style="font-size:.88rem;color:#ad8774">Java9<sup>21</sup></a><a href="/tags/Java%E5%B9%B6%E5%8F%91/" style="font-size:.88rem;color:#19704c">Java并发<sup>20</sup></a><a href="/tags/Lambda/" style="font-size:.88rem;color:#7e5c78">Lambda<sup>4</sup></a><a href="/tags/Lock/" style="font-size:.88rem;color:#700769">Lock<sup>1</sup></a><a href="/tags/Maven/" style="font-size:.88rem;color:#2b8671">Maven<sup>1</sup></a><a href="/tags/Memcached/" style="font-size:.88rem;color:#1b0694">Memcached<sup>23</sup></a><a href="/tags/Mongodb/" style="font-size:.88rem;color:#36202d">Mongodb<sup>49</sup></a><a href="/tags/Queue/" style="font-size:.88rem;color:#643f76">Queue<sup>1</sup></a><a href="/tags/Redis/" style="font-size:.88rem;color:#1e4c38">Redis<sup>27</sup></a><a href="/tags/Stream/" style="font-size:.88rem;color:#a5a097">Stream<sup>4</sup></a><a href="/tags/Thread/" style="font-size:.88rem;color:#05682d">Thread<sup>7</sup></a><a href="/tags/Thread-pool/" style="font-size:.88rem;color:#38ad2a">Thread pool<sup>7</sup></a><a href="/tags/forkJoinPool/" style="font-size:.88rem;color:#827a6b">forkJoinPool<sup>2</sup></a><a href="/tags/stream/" style="font-size:.88rem;color:#4a3ac7">stream<sup>1</sup></a><a href="/tags/%E4%B8%93%E6%A0%8F/" style="font-size:.88rem;color:#b89c14">专栏<sup>35</sup></a><a href="/tags/%E4%BA%8B%E5%8A%A1/" style="font-size:.88rem;color:#922401">事务<sup>1</sup></a><a href="/tags/%E4%BC%98%E5%8C%96/" style="font-size:.88rem;color:#437d09">优化<sup>1</sup></a><a href="/tags/%E5%91%BD%E4%BB%A4/" style="font-size:.88rem;color:#705b06">命令<sup>57</sup></a><a href="/tags/%E5%AE%89%E8%A3%85/" style="font-size:.88rem;color:#06a544">安装<sup>6</sup></a><a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size:.88rem;color:#c86c4f">工具<sup>2</sup></a><a href="/tags/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B/" style="font-size:.88rem;color:#560b2c">数据类型<sup>8</sup></a><a href="/tags/%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F/" style="font-size:.88rem;color:#4e0a32">生命周期<sup>1</sup></a><a href="/tags/%E7%AE%80%E4%BB%8B/" style="font-size:.88rem;color:#230f8e">简介<sup>7</sup></a><a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size:.88rem;color:#c0771e">算法<sup>10</sup></a><a href="/tags/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" style="font-size:.88rem;color:#b40caa">设计模式<sup>38</sup></a><a href="/tags/%E9%85%8D%E7%BD%AE/" style="font-size:.88rem;color:#67389a">配置<sup>2</sup></a><a href="/tags/%E9%9D%A2%E8%AF%95/" style="font-size:.88rem;color:#57425c">面试<sup>11</sup></a></div></div><hr></div></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="anzhiyufont anzhiyu-icon-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="anzhiyufont anzhiyu-icon-arrows-left-right"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="anzhiyufont anzhiyu-icon-gear"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="anzhiyufont anzhiyu-icon-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="anzhiyufont anzhiyu-icon-comments"></i></a><button type="button" title="切换背景" onclick="toggleWinbox()"><i class="fas fa-display"></i></button><button id="go-up" type="button" title="回到顶部"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></button></div></div><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="anzhiyufont anzhiyu-icon-xmark"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="anzhiyufont anzhiyu-icon-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="anzhiyufont anzhiyu-icon-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="anzhiyufont anzhiyu-icon-arrow-rotate-right" style="font-size:1rem"></i></div><div class="rightMenu-item" id="menu-top"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></div></div><div class="rightMenu-group rightMenu-line rightMenuPlugin"><div class="rightMenu-item" id="menu-copytext"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制选中文本</span></div><div class="rightMenu-item" id="menu-pastetext"><i class="anzhiyufont anzhiyu-icon-paste"></i><span>粘贴文本</span></div><a class="rightMenu-item" id="menu-commenttext"><i class="anzhiyufont anzhiyu-icon-comment-medical"></i><span>引用到评论</span></a><div class="rightMenu-item" id="menu-newwindow"><i class="anzhiyufont anzhiyu-icon-window-restore"></i><span>新窗口打开</span></div><div class="rightMenu-item" id="menu-copylink"><i class="anzhiyufont anzhiyu-icon-link"></i><span>复制链接地址</span></div><div class="rightMenu-item" id="menu-copyimg"><i class="anzhiyufont anzhiyu-icon-images"></i><span>复制此图片</span></div><div class="rightMenu-item" id="menu-downloadimg"><i class="anzhiyufont anzhiyu-icon-download"></i><span>下载此图片</span></div><div class="rightMenu-item" id="menu-newwindowimg"><i class="anzhiyufont anzhiyu-icon-window-restore"></i><span>新窗口打开图片</span></div><div class="rightMenu-item" id="menu-search"><i class="anzhiyufont anzhiyu-icon-magnifying-glass"></i><span>站内搜索</span></div><div class="rightMenu-item" id="menu-searchBaidu"><i class="anzhiyufont anzhiyu-icon-magnifying-glass"></i><span>百度搜索</span></div><div class="rightMenu-item" id="menu-music-toggle"><i class="anzhiyufont anzhiyu-icon-play"></i><span>播放音乐</span></div><div class="rightMenu-item" id="menu-music-back"><i class="anzhiyufont anzhiyu-icon-backward"></i><span>切换到上一首</span></div><div class="rightMenu-item" id="menu-music-forward"><i class="anzhiyufont anzhiyu-icon-forward"></i><span>切换到下一首</span></div><div class="rightMenu-item" id="menu-music-playlist" onclick="window.open(&quot;https://y.qq.com/n/ryqq/playlist/8802438608&quot;, &quot;_blank&quot;);" style="display:none"><i class="anzhiyufont anzhiyu-icon-radio"></i><span>查看所有歌曲</span></div><div class="rightMenu-item" id="menu-music-copyMusicName"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制歌名</span></div></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" id="menu-randomPost"><i class="anzhiyufont anzhiyu-icon-shuffle"></i><span>随便逛逛</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="anzhiyufont anzhiyu-icon-cube"></i><span>博客分类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="anzhiyufont anzhiyu-icon-tags"></i><span>文章标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item" id="menu-copy" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-copy"></i><span>复制地址</span></a><a class="rightMenu-item" id="menu-commentBarrage" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-message"></i><span class="menu-commentBarrage-text">关闭热评</span></a><a class="rightMenu-item" id="menu-darkmode" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-circle-half-stroke"></i><span class="menu-darkmode-text">深色模式</span></a><a class="rightMenu-item" id="menu-translate" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="anzhiyufont anzhiyu-icon-language"></i><span>轉為繁體</span></a></div></div><div id="rightmenu-mask"></div><div id="he-plugin-simple"></div><script>var WIDGET={CONFIG:{modules:"0124",background:"2",tmpColor:"FFFFFF",tmpSize:"16",cityColor:"FFFFFF",citySize:"16",aqiColor:"E8D87B",aqiSize:"16",weatherIconSize:"24",alertIconSize:"18",padding:"10px 10px 10px 10px",shadow:"0",language:"auto",borderRadius:"20",fixed:"true",vertical:"top",horizontal:"left",left:"20",top:"7.1",key:"df245676fb434a0691ead1c63341cd94"}}</script><link rel="stylesheet" href="https://widget.qweather.net/simple/static/css/he-simple.css?v=1.4.0"><script src="https://widget.qweather.net/simple/static/js/he-simple.js?v=1.4.0"></script><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.cbd.int/@fancyapps/ui@5.0.20/dist/fancybox/fancybox.umd.js"></script><script src="https://cdn.cbd.int/instant.page@5.2.0/instantpage.js" type="module"></script><script src="https://cdn.cbd.int/vanilla-lazyload@17.8.4/dist/lazyload.iife.min.js"></script><script src="https://cdn.cbd.int/node-snackbar@0.1.16/dist/snackbar.min.js"></script><script>function panguFn(){"object"==typeof pangu?pangu.autoSpacingPage():getScript("https://cdn.cbd.int/pangu@4.0.7/dist/browser/pangu.min.js").then(()=>{pangu.autoSpacingPage()})}function panguInit(){panguFn()}document.addEventListener("DOMContentLoaded",panguInit)</script><script>var meting_api="https://api.injahow.cn/meting/?server=:server&type=:type&id=:id&auth=:auth&r=:r"</script><canvas id="universe"></canvas><script async src="https://npm.elemecdn.com/anzhiyu-theme-static@1.0.0/dark/dark.js"></script><script>var HoldLog=console.log;console.log=function(){};let now1=new Date;queueMicrotask(()=>{function o(){HoldLog.apply(console,arguments)}var c=new Date("09/01/2018 00:00:00"),c=(now1.setTime(now1.getTime()+250),(now1-c)/1e3/60/60/24),c=["欢迎使用安知鱼!","生活明朗, 万物可爱",`
        
       █████╗ ███╗   ██╗███████╗██╗  ██╗██╗██╗   ██╗██╗   ██╗
      ██╔══██╗████╗  ██║╚══███╔╝██║  ██║██║╚██╗ ██╔╝██║   ██║
      ███████║██╔██╗ ██║  ███╔╝ ███████║██║ ╚████╔╝ ██║   ██║
      ██╔══██║██║╚██╗██║ ███╔╝  ██╔══██║██║  ╚██╔╝  ██║   ██║
      ██║  ██║██║ ╚████║███████╗██║  ██║██║   ██║   ╚██████╔╝
      ╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝╚═╝   ╚═╝    ╚═════╝
        
        `,"已上线",Math.floor(c),"天","©2018 By 安知鱼 V1.6.6"],e=["NCC2-036","调用前置摄像头拍照成功，识别为【小笨蛋】.","Photo captured: ","🤪"];setTimeout(o.bind(console,`
%c${c[0]} %c ${c[1]} %c ${c[2]} %c${c[3]}%c ${c[4]}%c ${c[5]}

%c ${c[6]}
`,"color:#425AEF","","color:#425AEF","color:#425AEF","","color:#425AEF","")),setTimeout(o.bind(console,`%c ${e[0]} %c ${e[1]} %c 
${e[2]} %c
${e[3]}
`,"color:white; background-color:#4fd953","","",'background:url("https://npm.elemecdn.com/anzhiyu-blog@1.1.6/img/post/common/tinggge.gif") no-repeat;font-size:450%')),setTimeout(o.bind(console,"%c WELCOME %c 你好，小笨蛋.","color:white; background-color:#4f90d9","")),setTimeout(console.warn.bind(console,"%c ⚡ Powered by 安知鱼 %c 你正在访问 云少 的博客.","color:white; background-color:#f0ad4e","")),setTimeout(o.bind(console,"%c W23-12 %c 你已打开控制台.","color:white; background-color:#4f90d9","")),setTimeout(console.warn.bind(console,"%c S013-782 %c 你现在正处于监控中.","color:white; background-color:#d9534f",""))})</script><script async src="/anzhiyu/random.js"></script><script async>!function(){var n,o,r,a,i,e=new Date("09/01/2018 00:00:00"),l=new Date;setInterval(()=>{var t;if(l=new Date,i=l.getHours(),t=(l-e)/1e3/60/60/24,n=Math.floor(t),t=(l-e)/1e3/60/60-24*n,o=Math.floor(t),1==String(o).length&&(o="0"+o),t=(l-e)/1e3/60-1440*n-60*o,r=Math.floor(t),1==String(r).length&&(r="0"+r),t=(l-e)/1e3-86400*n-3600*o-60*r,a=Math.round(t),1==String(a).length&&(a="0"+a),document.getElementById("footer")){let e="";e=(i<18&&9<=i||((t=document.querySelector("#workboard .workSituationImg")).src="https://npm.elemecdn.com/anzhiyu-blog@2.0.4/img/badge/安知鱼-下班啦.svg",t.title="下班了就该开开心心的玩耍，嘿嘿~",t.alt="下班了就该开开心心的玩耍，嘿嘿~"),`本站居然运行了 ${n} 天<span id='runtime'> ${o} 小时 ${r} 分 ${a} 秒 </span><i class='anzhiyufont anzhiyu-icon-heartbeat' style='color:red'></i>`),document.getElementById("runtimeTextTip")&&(document.getElementById("runtimeTextTip").innerHTML=e)}},1e3)}()</script><script src="https://cdn.cbd.int/algoliasearch@4.18.0/dist/algoliasearch-lite.umd.js"></script><script src="https://cdn.cbd.int/instantsearch.js@4.56.5/dist/instantsearch.production.min.js"></script><script src="/js/search/algolia.js"></script><div class="js-pjax"><script>(()=>{const e=document.querySelectorAll("#article-container .mermaid-wrap");if(0!==e.length){const n=()=>{window.loadMermaid=!0;const a="dark"===document.documentElement.getAttribute("data-theme")?"dark":"default";Array.from(e).forEach((e,t)=>{const n=e.firstElementChild;e="%%{init:{ 'theme':'"+a+"'}}%%\n"+n.textContent;const d=mermaid.render("mermaid-"+t,e);"string"==typeof d?(t=d,n.insertAdjacentHTML("afterend",t)):d.then(({svg:e})=>{n.insertAdjacentHTML("afterend",e)})})};var t=()=>{window.loadMermaid?n():getScript("https://cdn.cbd.int/mermaid@10.2.4/dist/mermaid.min.js").then(n)};anzhiyu.addGlobalFn("themeChange",n,"mermaid"),window.pjax?t():document.addEventListener("DOMContentLoaded",t)}})()</script><script>(()=>{const t=()=>{twikoo.init(Object.assign({el:"#twikoo-wrap",envId:"https://twikoo.tryrun.top/",region:"",onCommentLoaded:()=>{anzhiyu.loadLightbox(document.querySelectorAll("#twikoo .tk-content img:not(.tk-owo-emotion)"))}},null))};var o=()=>{"object"==typeof twikoo?setTimeout(n,0):getScript("https://cdn.cbd.int/twikoo@1.6.18/dist/twikoo.all.min.js").then(n)};const n=()=>{t()};anzhiyu.loadComment(document.getElementById("twikoo-wrap"),o)})()</script><script>(()=>{const t=()=>{window.artalkItem=new Artalk(Object.assign({el:"#artalk-wrap",server:"https://artalk.tryrun.top/",site:"https://blog.tryrun.top/",pageKey:location.pathname,darkMode:"dark"===document.documentElement.getAttribute("data-theme"),countEl:".artalk-count"},null)),"null"!==GLOBAL_CONFIG.lightbox&&window.artalkItem.use(t=>{t.on("list-loaded",()=>{t.getCommentList().forEach(t=>{t=t.getRender().$content;anzhiyu.loadLightbox(t.querySelectorAll("img:not([atk-emoticon])"))})})})};var a=async()=>{"object"==typeof window.artalkItem||(await getCSS("https://cdn.cbd.int/artalk@2.5.5/dist/Artalk.css"),await getScript("https://cdn.cbd.int/artalk@2.5.5/dist/Artalk.js")),t()};anzhiyu.addGlobalFn("themeChange",t=>{var a=document.getElementById("artalk-wrap");a&&a.children.length&&window.artalkItem.setDarkMode("dark"===t)},"artalk"),window.loadOtherComment=a})()</script><input type="hidden" name="page-type" id="page-type" value="post"></div><script>window.addEventListener("load",()=>{const t=e=>e=""!==e&&150<(e=(e=(e=(e=e.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length?e.substring(0,150)+"...":e,n=t=>{let n="";if(t.length)for(let e=0;e<t.length;e++)n=(n=(n+="<div class='aside-list-item'>")+`<a href='${t[e].url}' class='thumbnail'><img data-lazy-src='${t[e].avatar}' alt='${t[e].nick}'><div class='name'><span>${t[e].nick} </span></div></a>`)+`<div class='content'>
        <a class='comment' href='${t[e].url}' title='${t[e].content}'>${t[e].content}</a>
        <time datetime="${t[e].date}">${anzhiyu.diffDate(t[e].date,!0)}</time></div>
        </div>`;else n+="没有评论";var e=document.querySelector("#card-newest-comments .aside-list");e.innerHTML=n,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(e)};var e=()=>{var e;document.querySelector("#card-newest-comments .aside-list")&&((e=saveToLocal.get("twikoo-newest-comments"))?n(JSON.parse(e)):(e=()=>{twikoo.getRecentComments({envId:"https://twikoo.tryrun.top/",region:"",pageSize:6,includeReply:!0}).then(function(e){e=e.map(e=>({content:t(e.comment),avatar:e.avatar,nick:e.nick,url:e.url+"#"+e.id,date:new Date(e.created).toISOString()}));saveToLocal.set("twikoo-newest-comments",JSON.stringify(e),10/1440),n(e)}).catch(function(e){document.querySelector("#card-newest-comments .aside-list").textContent="无法获取评论，请确认相关配置是否正确"})},"object"==typeof twikoo?e():getScript("https://cdn.cbd.int/twikoo@1.6.18/dist/twikoo.all.min.js").then(e)))};e(),document.addEventListener("pjax:complete",e)})</script><script async data-pjax src="https://npm.elemecdn.com/anzhiyu-theme-static@1.0.1/bubble/bubble.js"></script><script>var visitorMail="visitor@anheyu.com"</script><script async data-pjax src="https://cdn.cbd.int/anzhiyu-theme-static@1.0.0/waterfall/waterfall.js"></script><script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script><script src="/js/anzhiyu/right_click_menu.js"></script><link rel="stylesheet" href="https://cdn.cbd.int/anzhiyu-theme-static@1.1.9/icon/ali_iconfont_css.css"><script async src="/js/1.min.js?1"></script><script async src="/js/bg.js?1"></script><script async src="https://cdn1.tianli0.top/npm/sweetalert2@8.19.0/dist/sweetalert2.all.js"></script><script async src="/js/lunar.min.js?1"></script><script async src="/js/day.min.js?1"></script><script async src="/js/winbox.bundle.min.js?1"></script><script id="click-show-text" src="https://cdn.cbd.int/butterfly-extsrc@1.1.3/dist/click-show-text.min.js" data-mobile="true" data-text="富强,民主,文明,和谐,自由,平等,公正,法治,爱国,敬业,诚信,友善" data-fontsize="15px" data-random="true" async></script><link rel="stylesheet" href="https://cdn.cbd.int/anzhiyu-theme-static@1.0.0/aplayer/APlayer.min.css" media="print" onload='this.media="all"'><script src="https://cdn.cbd.int/anzhiyu-blog-static@1.0.1/js/APlayer.min.js"></script><script src="https://cdn.cbd.int/hexo-anzhiyu-music@1.0.1/assets/js/Meting2.min.js"></script><script src="https://cdn.cbd.int/pjax@0.2.8/pjax.min.js"></script><script>let pjaxSelectors=['meta[property="og:image"]','meta[property="og:title"]','meta[property="og:url"]','meta[property="og:type"]','meta[property="og:site_name"]','meta[property="og:description"]',"head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"];var pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:pjaxSelectors,cacheBust:!1,analytics:!0,scrollRestoration:!1});document.addEventListener("pjax:send",function(){if(anzhiyu.removeGlobalFnEvent("pjax"),anzhiyu.removeGlobalFnEvent("themeChange"),document.getElementById("rightside").classList.remove("rightside-show"),window.aplayers)for(let e=0;e<window.aplayers.length;e++)window.aplayers[e].options.fixed||window.aplayers[e].destroy();"object"==typeof typed&&typed.destroy();var e=document.body.classList;e.contains("read-mode")&&e.remove("read-mode")}),document.addEventListener("pjax:complete",function(){window.refreshFn(),document.querySelectorAll("script[data-pjax]").forEach(e=>{const t=document.createElement("script");var a=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach(e=>t.setAttribute(e.name,e.value)),t.appendChild(document.createTextNode(a)),e.parentNode.replaceChild(t,e)}),GLOBAL_CONFIG.islazyload&&window.lazyLoadInstance.update(),"function"==typeof chatBtnFn&&chatBtnFn(),"function"==typeof panguInit&&panguInit(),"function"==typeof gtag&&gtag("config","G-3VMKW5TZBM",{page_path:window.location.pathname}),"object"==typeof _hmt&&_hmt.push(["_trackPageview",window.location.pathname]),"function"==typeof loadMeting&&document.getElementsByClassName("aplayer").length&&loadMeting(),"object"==typeof Prism&&Prism.highlightAll()}),document.addEventListener("pjax:error",e=>{404===e.request.status&&pjax.loadUrl("/404.html")})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><script charset="UTF-8" src="https://cdn.cbd.int/anzhiyu-theme-static@1.1.5/accesskey/accesskey.js"></script></div><div id="popup-window"><div class="popup-window-title">通知</div><div class="popup-window-divider"></div><div class="popup-window-content"><div class="popup-tip">你好呀</div><div class="popup-link"><i class="anzhiyufont anzhiyu-icon-arrow-circle-right"></i></div></div></div></body></html>